I have a list of elements with some values in it.
I want to map it to a function and produce a list that contains, values computed by applying this two argument function to consecutive values in the first list.
This list will have one less element.
mapping function should take two arguments at a time.
EDIT
Example
the two argument function I am using is quite complex, so for simplicity lets assume it to be a function that calculated average of two numbers.
if I have a list: [3 8 11 14 19 20 88].
Is it possible for me two write a function that maps my average function which for (average 3 8) will give 5.5
for (average 8 11) will give 9.5
and (average 11 14) will give 12.5
and so on...
on applying average to two consecutive values of the list at a time should give me.
[5.5 9.5 12.5 16.5 19.5 54.0]
as result.
map applies a single argument function to whole list and produces a new list with exactly same number of elements.
what I want is a way to apply my function which takes two arguments to take two consecutive at a time, apply my function to it and add the result to a new list.