Q:

Adding difference of pair of numbers in list using map/reduce

I am practicing exercises for functional programming concepts using python. I came across this problem. I have tried a lot and couldn't find a solution using functional programming constructs like map/reduce, closures.
Problem: Given a list of numbers 
list = [10, 9, 8, 7, 6, 5, 4, 3]

Find sum of difference in each pair using Map/Reduce or any functional programming concepts e.g 
[[10 -9] + [8 - 7] + [6 -5] + [4 - 3]] = 4

For me tricky part is isolating pairs using map/reduce/recursion/closure

A:

The recursive relationship you are looking for is
f([4, 3, 2, 1]) = 4 - 3 + 2 - 1 = 4 - (3 - 2 + 1) = 4 - f([3, 2, 1])

