On Mon, Feb 13, 2012 at 10:55 AM, Domenic Denicola < dome...@domenicdenicola.com> wrote:
> > As a starting point, would it make sense to provide an API that matches > Array.prototype methods (where applicable)? > > I think this ties in to my earlier desire to make Array.prototype methods > work with iterators in general [1]. That is, I think the correct way to do > this would be: > > 1) To specify that "set is an iterator that, when iterated over, returns > its values." > 2) To specify that all iterators get (at least): every, filter, forEach, > map, reduce, reduceRight, some > +1 This is very intuitive and the sort of thing that real-world developers will be expecting > > One potential sticking point is that we might want filter and map to > return sets themselves. > Not sure if this is a "sticking point" or just a good idea. I'm leaning towards the latter :) > > [1]: > https://mail.mozilla.org/pipermail/es-discuss/2012-February/020356.html > >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss