2 ms·
Collectors in Java >= 8 are quite reminiscent of these "beautiful folds", so much that I have wondered why the standard library lacks a proper Applicative-like
by danidiaz 9y ago
Collectors in Java >= 8 are quite reminiscent of these "beautiful folds", so much that I have wondered why the standard library lacks a proper Applicative-like composition method, which is so useful for avoiding multiple traversals of the data.
Something like it can be defined: https://stackoverflow.com/questions/30210547/grouping-by-object-value-counting-and-then-setting-group-key-by-maximum-object/30211021#30211021 https://stackoverflow.com/questions/30210547/grouping-by-obj... although the signature is a bit ugly.