groupMap<K, V> method

Map<K, V> groupMap<K, V>(
  1. K by(
    1. T item
    ),
  2. V as(
    1. List<T> item
    )
)

Groups Iterable via K by(T item) and maps it using V as(List<T> item) conversion.

For more info about mapping refer to Iterable.map.

Implementation

Map<K, V> groupMap<K, V>(K by(T item), V as(List<T> item)) =>
    group(by).map((k, v) => MapEntry(k, as(v)));