groupBy method
Group by objects according to condition
Example:
list.groupBy(fn)
Implementation
Map<T, List<T>> groupBy(T Function(T) fn) => Map<T, List<T>>.fromIterable(
map(fn).toSet(),
value: (i) => where((T v) => fn(v) == i).toList(),
);