`fun <K, V> MutableMap<K, V>.putAll(va...
# language-proposals
h
fun <K, V> MutableMap<K, V>.putAll(vararg pairs: Pair<K, V>): Unit
kinda strange it's not in the stdlib already...?
d
Yeah ikr, I've asked for this somewhere.
You can do
pairs.associateTo(this) { it }
.
h
oh, thanks
k
Am I missing something? It does exist,
+=
works as well: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/put-all.html
d
Oh wow. It's not vararg though. 😛
h
@karelpeeters yeah, i'm aware of that. I'm specifically asking for a vararg variation
k
Oh okay, just making sure simple smile
h
although, this post should have probably been made in #stdlib instead...