`.toArray()` for all generators

Forbes Lindesay forbes at lindesay.co.uk
Wed Aug 28 08:02:32 PDT 2013


It would be nice from a readability point of view if `iteratable.toArray()` could always be used as a substitute for `Array.from(iteratable)`.  Is there a way that could be neatly achieved?  It would also be nice if methods like `.map` and `.filter` existed on iteratables.  C# does this via the concept of extension methods, but I wonder whether something similar could be achieved here, at least in the case of built in iteratables?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130828/f9abdc21/attachment.html>


More information about the es-discuss mailing list