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:
differences fs = zipWith (-) fs (tail fs)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With