Domenic Denicola (2014-10-05T00:58:04.000Z)
From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Domenic Denicola

> Unless I'm missing something (quite possible!), I would prefer not to add new methods to Map and Set when they could be added to %IteratorPrototype%.

Yeah, I'm missing something. It's the difference in code between:

```js
var newMap = oldMap.map(([k, v]) => [k + 1, v + 1]);
```

versus

```js
var newMap = new Map(oldMap.entries().map((([k, v]) => [k + 1, v + 1]);
```

I think I still prefer avoiding every iterable subclass adding its own map/filter/etc. in favor of people using the compositional base primitives, but at least I see the argument now.
forbes at lindesay.co.uk (2016-02-01T12:54:59.469Z)
Yeah, I'm missing something. It's the difference in code between:

```js
var newMap = oldMap.map(([k, v]) => [k + 1, v + 1]);
```

versus

```js
var newMap = new Map(oldMap.entries().map((([k, v]) => [k + 1, v + 1]);
```

I think I still prefer avoiding every iterable subclass adding its own map/filter/etc. in favor of people using the compositional base primitives, but at least I see the argument now.