3 ms·
In ES6 there are iterables that one uses `for...of` with. Rauschmayer of 2ality has said that `for...of` should be used instead of forEach and I wonder how that
by VieElm 12y ago
In ES6 there are iterables that one uses `for...of` with. Rauschmayer of 2ality has said that `for...of` should be used instead of forEach and I wonder how that will affect composability in functional programming. I quite like the concept of iteratables and creating data structures that can make use of for of and generators. I just have thought about how that affects functional style programming.
- bzbarsky 12y agofor..of simply desugars into getting an iterator from the iterable and then iterating it, right? To compose iterables, you'd presumably work with iterators directly instead of the sugar.