How can I apply a function to a list with non-overlapping window. E.g. $data = \{x_1, x_2, ...., x_n\}$ and we apply f with window size 2 to get $\{f(x_1,x_2), f(x_3, x_4), ...., f(x_{n-1}. x_n)\}$.
I understand that I can partition and use map on the partitioned list. But are there more efficient ways to handle this operation?
f /@ Partition[Range[10], 2]
. $\endgroup$