groupBy<K, V> function
Splits an iterable into sub-lists stored in a map, based on result of
calling getKey
function on each element of items
, and grouping the
results according to values returned.
Implementation
Map<K, List<V>> groupBy<K, V>(Func1<V, K> getKey, Iterable<V> items) =>
_groupBy(getKey, items);