> a higher-order function that applies a given function to each element of a functor, e.g. a list, returning a list of results in the same order.
Since that is not what Array.prototype.map does, it is not map, it is some similar thing that is misnamed as map. If I wanted the index and the array as arguments, I would ask for them.
FTFY.
I know exactly how map works: https://en.m.wikipedia.org/wiki/Map_(higher-order_function)
This is map:
> a higher-order function that applies a given function to each element of a functor, e.g. a list, returning a list of results in the same order.
Since that is not what Array.prototype.map does, it is not map, it is some similar thing that is misnamed as map. If I wanted the index and the array as arguments, I would ask for them.