Join Slack
Powered by
<@U1C58NP0B> You could use `val myMap = mapOf(*pai...
# getting-started
r
Ruckus
10/27/2016, 2:26 PM
@frogger
You could use
val myMap = mapOf(*pairs)
,
but since
mapOf
already takes
vararg Pair(K, V)
I dont't really see the purpose of your function
misread code example
. Also,
Array<Pair<K, V>>
and
List<Pair<K, V>>
both already have a
toMap()
function on them.
5
Views
Open in Slack
Previous
Next