Join Slack
Powered by
listOf() is by default immutable. mutableListOf() ...
# getting-started
j
jacob
11/05/2018, 10:51 AM
listOf() is by default immutable. mutableListOf() is mutable.
a
APXEOLOG
11/05/2018, 10:54 AM
But i cannot pass existing collection to the
listOf
, it only accepts varargs
d
diesieben07
11/05/2018, 10:54 AM
You can use
toList()
on an existing collection.
a
APXEOLOG
11/05/2018, 10:54 AM
Oh! Thanks!
3
Views
Open in Slack
Previous
Next