Not sure I follow. The `groupBy` accepts a key sel...
# announcements
a
Not sure I follow. The
groupBy
accepts a key selector function:
Copy code
/**
 * Returns a map of the elements in original collection grouped by the key returned by the given [selector] function.
 */
public inline fun <T, K> Iterable<T>.groupBy(selector: (T) -> K): Map<K, List<T>> {
    return groupByTo(LinkedHashMap<K, MutableList<T>>(), selector)
}