Join Slack
Communities
Powered by
`foo.map { it -> it.index to it.value }` create...
# getting-started
d
dG
11/14/2018, 1:05 PM
foo.map { it -> it.index to it.value }
creates a
List<Pair(Int, String)>
. If I
toMap()
on that, I get a
Map<Int, String>
, but is there a better (shorter, more Kotliny) way to get this Map?
Open in Slack
Previous
Next