groupBy<S> method

Stream<GroupByStream<T, S>> groupBy <S>(
  1. S grouper(
    1. T value
    )
)

The GroupBy operator divides a Stream that emits items into a Stream that emits GroupByStream, each one of which emits some subset of the items from the original source Stream.

GroupByStream acts like a regular Stream, yet adding a 'key' property, which receives its Type and value from the grouper Function.

All items with the same key are emitted by the same GroupByStream.

Implementation

Stream<GroupByStream<T, S>> groupBy<S>(S Function(T value) grouper) =>
    transform(GroupByStreamTransformer<T, S>(grouper));