Ellen Spertus
01/31/2020, 8:09 PMMap
using a transform function, but I can’t figure out how. Here is the closest I’ve gotten:
val squares: Map<Int, Int> = mapOf(slots.indices.map { i ->
i to i * i
}
(I’m not really interested in squares. It’s a simplified example.)