Group<T> extension

on

Methods

groupBy<K>(K key(T element)) Map<K, Iterable<T>>

Available on Iterable<T>, provided by the Group extension

Groups the elements of the iterable by a specified key function. The result is a map where each key corresponds to a list of elements that share the same key.