# Why does functional map() operation not permit operating on two elements of a list at a time?

Mathematically it seems so easy to use two elements of a vector as two arguments to a function. $$f(\boldsymbol{x_{i+1}},\boldsymbol{x_{i}})$$ In functional programming however a map (function) allows to work with one element at a time only, so one would need to create vector of pairwise 2-tuples from a single initial vector fisrt. Why is that? Is it also more proper mathematically?

• As you state, there is a method to essentially encode what you want. Why programming languages decide to encode your operation in a certain way is likely a matter of opinion and historical reasons. – Discrete lizard Jan 8 '18 at 9:53
• 1) You're missing corner cases. What if $i$ is the last index? The function is not well-defined per se. 2) You can easily "zip" a list with a shifted copy and map that one. – Raphael Jan 8 '18 at 12:25

Conceptually, 1-argument map should be able to work on unordered collections, because each application of a mapping function doesn't know anything about the element's index.
For regular lists, we can recover the indices by zipping the list with the (infinite, unbounded) sequence [1..]. So, the ability to zip assumes the sequence is ordered - not in values, but positionally.