Hacker News new | ask | show | jobs
by karatestomp 2214 days ago
> I wonder why map() functions this way in Javascript and if any other languages pass additional values like this in their own map() implementations.

Sometimes it's very convenient to be able to look ahead or behind the current element being map()'d to make decisions.