3 ms·
Well, if you want to be really minimal, `reduce` obviates the need for `map`, `filter`, and `forEach`. (Then I guess if you want to be all new school with it, y
by acjohnson55 12y ago
Well, if you want to be really minimal, `reduce` obviates the need for `map`, `filter`, and `forEach`. (Then I guess if you want to be all new school with it, you could use tranducers, but that's another story.) What I don't get is why Javascript libraries are so `flatMap` averse. Sure, it's a little harder to explain, but especially with the Promise-like convention, I think it's a quite generalization of `map` in most cases.