Anonymous user
Associative array/Iteration: Difference between revisions
Kotlin: with block idiom
(Kotlin: with block idiom) |
|||
Line 1,406:
val map = mapOf("hello" to 1, "world" to 2, "!" to 3)
with(map) {
map.forEach { println("key = ${it.key}, value = ${it.value}") }▼
}
}</lang>
{{Out}}
|