Dmitry Soshnikov (2014-10-05T05:03:52.000Z)
forbes at lindesay.co.uk (2016-02-01T12:55:39.534Z)
We already have `Map#forEach`, and correlation with `Array#forEach` -> `Array#map` makes this constancy intuitive. The only thing which Rick mentioned, is that `Map#map` should probably return a transformed `[key, value]` pair, that allows updating the key as well. However, need to think about it, since as mentioned on the diff [1], usually people transform only values, and to force them always return an array may be annoying (the key is not transformed in this case), and less performant in terms useless array allocation. This case I'd probably make as `Map#mapWithKey`, however there other questions arise like, should the returned pair replace the existing, or create a new one, if the key is different? ```js ({a => 10}).mapWithKey((k, v) => ['b', 20]); // {b => 20} or {a => 20, b => 20} ? ``` But this is for further discussion.