eclipse-collections icon indicating copy to clipboard operation
eclipse-collections copied to clipboard

Implement RichIterable.reduceBy().

Open motlin opened this issue 9 years ago • 2 comments

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 avatar Aug 15 '16 15:08 motlin

@motlin any progress on this? I was just looking through our issues and came across this one which looks like a good addition.

donraab avatar Dec 31 '19 19:12 donraab

It's still just an idea - I never worked on it.

motlin avatar Jan 01 '20 13:01 motlin