groupFoldBy<K, G> method
Bloom<Map<K, G> >
groupFoldBy<K, G>({
- required K key(
- E element
- required G fold(
- G? previous,
- E element
Groups and folds elements by a key computed from each element reactively.
key: Function extracting the grouping key from each element.fold: Function combining the previous group value (ornull) with the current element.
Implementation
Bloom<Map<K, G>> groupFoldBy<K, G>({
required K Function(E element) key,
required G Function(G? previous, E element) fold,
}) =>
computed((via) =>
Map<K, G>.unmodifiable(via(bloom).groupFoldBy<K, G>(key, fold)));