On Sat, Oct 4, 2014 at 10:03 PM, Dmitry Soshnikov
<dmitry.soshni...@gmail.com> wrote:
> 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?
>
> ```
> ({a => 10}).mapWithKey((k, v) => ['b', 20]); // {b => 20} or {a => 20, b =>
> 20} ?
> ```
>
> But this is for further discussion.

Mapping produces a new object, so the answer to that is luckily trivial.

~TJ
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to