# Moving map with non-overlapping window

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?

• – Rohit Namjoshi Jul 16 '19 at 15:27
• Pre-version 10.2, you can do f /@ Partition[Range[10], 2]. – march Jul 16 '19 at 17:16
• Yes, that might be as efficient as BlockMap. I was just thinking that there should be a direct implementation. As I see it was only from v 10.2 up. – Al Guy Jul 16 '19 at 20:07

data = Range[10];