Ellen Spertus
03/26/2020, 12:13 AMval pairs = listOf(
Pair("A", 1),
Pair("A", 2),
Pair("B", 3)
)
to this map:
mapOf(
"A" to listOf(1, 2),
"B" to listOf(3)
)
ilya.gorbunov
03/26/2020, 12:21 AM.groupBy(keySelector = { it.first }, valueTransform = { it.second })
Ellen Spertus
03/26/2020, 12:23 AM