Hi Adam,
It would be nice if .map would provide the index value as the second argument to its callback, or that the documentation clearly states that contrarily to Array::map, the index is provided as the third argument ;)
Typically, providing the index as second argument, one could write
lines.map (line,index) => …
or
lines().map (line,index) => …
(I'm a bit unclear on what the value currently provided in the second argument to enter would be, as well, but I haven't needed it.)
Hi Adam,
It would be nice if
.mapwould provide the index value as the second argument to its callback, or that the documentation clearly states that contrarily toArray::map, the index is provided as the third argument ;)Typically, providing the index as second argument, one could write
or
(I'm a bit unclear on what the
valuecurrently provided in the second argument toenterwould be, as well, but I haven't needed it.)