Given a list of pairs:
data = {{a,b},{c,d},{e,f},{g,h},{i,j}}
I need the moving map:
MapPair[F,data]
{ F[{a,b},{c,d}], F[{c,d},{e,f}], F[{e,f},{g,h}], F[{g,h},{i,j}] }
The built-in function MovingMap
does not work:
MovingMap[F,data,2]
Which built-in function does maps a function F
pairwise over the data?
myMapPair[func_, data_] := Array[func[data[[#1]], data[[#1 + 1]]] &, Length[data] - 1]
$\endgroup$BlockMap[F, data, 2, 1]
ought to work. $\endgroup$