groupBy<M> method
Implementation
Map<M, List<T>> groupBy<M>(M Function(T) grouper) {
Map<M, List<T>> map = {};
for (final T k in this) {
M t = grouper(k);
if (!map.containsKey(t)) {
map[t] = [];
}
map[t]!.add(k);
}
return map;
}