On Tue, Oct 7, 2014 at 1:45 PM, Bergi <[email protected]> wrote:

> I think all of the above examples are trying to create a case such as
>
> | UInt32Array.from(nodelist, node => parseInt(node.value, 10) );
>
> where neither can nodes be stored in an Uint32Array nor integers be stored
> in a NodeList.
>

Not sure what you mean by "nor integers be stored in a NodeList", but how
does your example differ from:

```
UInt32Array.from(nodeList.map(node => parseInt(node.value, 10)));
```

Anyhow, seems the only good reason (IMO) here is "an iterable may not have
own `map` method", and we can live with that. And the broken and confusing
examples (when a post-map is substituted to the place of a clear pre-map)
do not help that much. Otherwise, I'd remove the `mapfn` from `Array.from`
(unless to turn it into a comprehensions API and accept the filter as well).

Dmitry
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to