I’d like to create a `Map` using a transform funct...
# getting-started
e
I’d like to create a
Map
using a transform function, but I can’t figure out how. Here is the closest I’ve gotten:
Copy code
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.)