4 ms·
>no map, no filter, no flatmap, no reduce ES6 generators pretty much solve this, especially once you learn "yield*"
by xamuel 10y ago
>no map, no filter, no flatmap, no reduce
ES6 generators pretty much solve this, especially once you learn "yield*"
- WorldMaker 10y agoES6 generators are a low level construct. The concern is that you still need to add a dependency to a library such as wu.js [1] for the higher order functions around generators/iterables. (Compare with C# where a laundry list of higher order LINQ operators are provided out of the box as extensions to IEnumerable. Or Python's 2.x itertools modules, many of which have filtered into the top level of the standard library in Python 3.) [1] http://fitzgen.github.io/wu.js/ http://fitzgen.github.io/wu.js/