Hacker News new | ask | show | jobs
by marmart 3244 days ago
Those intermediate iterations could be dropped by composing the map functions together (same with the reduce), if that really was a performance bottleneck.
1 comments

With lazy iterators, there is the possibility of better composition of maps/filters/reduces. That's why I'm a fan of the lazy iterators approach -- otherwise the abstraction breaks too easily and it ends up looking like a for-loop anyway.