does `toMutableList` on a mutable list copy that l...
# announcements
j
does
toMutableList
on a mutable list copy that list? Otherwise, how do you copy a list? I could use the
ArrayList
constructor but if there is a kotlin way of copying a list I'd rather do that.
toMutableList
actually calls
ArrayList(this)
j
Good to know. I wasn't sure if there was some check on
this
to see if it was already a mutable list before copying it.