groupBy<K> method

Map<K, List<E>> groupBy<K>(
  1. K key(
    1. E
    )
)

Groups the elements by the value returned by key.

Returns a map from keys computed by key to a list of all values for which key returns that key. The values appear in the list in the same relative order as this.

Implementation

Map<K, List<E>> groupBy<K>(K Function(E) key) {
  return coll_lib.groupBy(this, key);
}