`foo.map { it -> it.index to it.value }` create...
# getting-started
d
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?