Maybe use entries so you don't have to walk the ma...
# stdlib
c
Maybe use entries so you don't have to walk the map twice?
Copy code
val m = mapOf<String, Int>()
    val copy = hashMapOf<String, Int>().apply {
        m.entries.forEach { e ->
            put(e.key, e.value)
        }
    }