Iterator combinator methods

Reinis Ivanovs dabas at
Sun Dec 11 14:04:13 UTC 2016

It's a complex issue:

 * Should the methods be lazy or eager? Not making them lazy would be a
missed opportunity
 * How is conversion between iterators/iterables handled? Something like
@@species for Array, or leave it to users to convert manually?
 * Should it be prototype methods or actually generic methods to be used
with bind syntax if that makes it into the language? As in, something like
`const {map} = Iterator; [1,2,3]::map(x => x + 2)`

On Fri, Dec 9, 2016 at 5:46 PM, Benjamin Gruenbaum <benjamingr at>

> Hey,
> I remember a lot of talk about adding `.map/.filter` etc to iterators. The
> benefits of doing this are pretty big and I think fairly well understood
> and several other proposals (like observables and async iterators) would
> benefit from it.
> (I expand on the big advantages this has over Array#map/filter if needed).
> Is anyone currently working on such a proposal? Was it discussed?
> I'd really like to see it move forward.
> Cheers
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list