is there something like `fun <T, K> List<...
# stdlib
l
is there something like
fun <T, K> List<T>.toMapBy(keySelector: (T) -> K): Map<K, T>
? i know there is
.groupBy
but that returns a map of lists, while most of the time i'd want the equivalent of
myList.map { it.myKey to it }.toMap()
l
thanks!