eclipse-collections
eclipse-collections copied to clipboard
Implement RichIterable.reduceBy().
The existing method RichIterable.aggregateBy(Function, Function0, Function2) is conceptually a groupBy() followed by injectInto() on each group of values. This method would be a groupBy followed by reduce() on each group of values. Multiple variants are possible, but the first signature ought to be:
<K, T> MapIterable<K, T> reduceBy(
Function<? super T, ? extends K> groupBy,
Function2<? super T, ? super T, ? extends T> reduceFunction);
@motlin any progress on this? I was just looking through our issues and came across this one which looks like a good addition.
It's still just an idea - I never worked on it.