I have a function (mergeall) that returns a float list. I want to calculate differences of every pair of adjacent elements in this list. For example:
[1.1,2.2,3.3,4.4,5.5,6.6]
do 1.1-2.2, 2.2-3.3,3.3-4.4...
return list of all difference
So, this should be pass into a list and return a list. The problems are:
- How can I use the list from "mergeall"?
- How can I do the algorithm above? Could somebody help me? Thanks!