2 ms·
Reduce is basically "loop over this list while maintaining state". If you have loops and state built in, it doesn't buy you a whole lot. I don't think the aim
by foldr 6y ago
Reduce is basically "loop over this list while maintaining state". If you have loops and state built in, it doesn't buy you a whole lot.
I don't think the aim of the package is to move Go towards a more functional style. Rather, it's to provide a set of utility functions that mesh with the style of existing Go code. For example, it would be useful to have a utility to 'pop' an element from a slice, even though that's not a particularly functional idiom.
- sabellito 6y agoI definitely wasn't arguing about what should or should not be in the package. I just replied to the parent comment with my idea as to why the discussion around this point is happening in the proposal.