Using sml writes a version of sumpairs that sums each


You have to implement sumPairs and sumof.

Question- Using SML writes a version of sumPairs that sums each component of the pairs separately, returning a pair consisting of the sumof the first components and the sum of the second components

fun sumPairs(nil) = 0

| sumPairs((x,y)::zs) = x + y + sumPairs(zs);

val sumPairs = fn : (int * int) list -> int

Please keep it simple and short and no copy and paste or at least help me get started?

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Using sml writes a version of sumpairs that sums each
Reference No:- TGS0966223

Expected delivery within 24 Hours