groupMap<K, V> method
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)));