Skip to content

Implement RichIterable.reduceBy(). #134

@motlin

Description

@motlin

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);

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions