Question: Write a version of this function:
fun sumPairs(nil) = 0
| sumPairs ((x,y)::zs) = x + y + sumPairs(zs);
That sums each component of the pairs individually, returning a pair consisting of the sum of the first components and the sum of the second components. (sum x, sum y)
Can someone demonstrate me how to write a proper code for this problem and how to complete it.