> On 20 Nov 2014, at 1:49 , Dmitry Soshnikov <dmitry.soshni...@gmail.com> wrote:
> 
> (For the history of this thread to refer to it later)
> 
> At the meeting it was decided not to go with `map` and `filter` sitting on 
> `Map.prototype`, but instead to use iterators in the way like:
> 
> ```
> map
>   .entries() // returns an iterator
>   .map((v, k, m) => { ... })
>   .filter((v, k, m) => { ... })
>   .collect(); // returns a new map after all transforms
> ```


Question – shouldn’t this example be written as follows?

```
map
  .entries() // returns an iterator
  .map(([k,v], i, m) => { ... })
  .filter(([k,v], i, m) => { ... })
  .collect(); // returns a new map after all transforms
```

Otherwise, I suggest to change the names (e.g. to `mapPairs` and `filterPairs`).

-- 
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de



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

Reply via email to