News for hackers. Stuff that matters.
Re:Making the move from Scala to Go by lostcolony on Wednesday January 25, 2017 @09:33AM (#13481593)
Technically, reduce covers map, flatmap, filter, etc. It's every bit as flexible as a for-each loop (the only difference is it implies no side effects, but does not guarantee them if the language doesn't).

The very reason those other functional constructs were split out was not due to need, but due to -clarity-. And that same clarity applies to why to use one of those constructs instead of a for-each loop.

There are no comments on this comment yet.