Bernhard
08/09/2018, 6:24 AMrocketraman
08/09/2018, 6:27 AMval
just means the variable reference cannot be reassigned. The referenced object itself can be mutated if the object supports mutation.Bernhard
08/09/2018, 6:28 AMBernhard
08/09/2018, 6:29 AMrocketraman
08/09/2018, 6:29 AMSet
or MutableSet
?Bernhard
08/09/2018, 6:29 AMBernhard
08/09/2018, 6:29 AMBernhard
08/09/2018, 6:29 AMrocketraman
08/09/2018, 6:30 AMList
, Set
are immutable (really not immutable, but read-only, as the underlying collection is the same, just the interface is different).rocketraman
08/09/2018, 6:30 AMBernhard
08/09/2018, 6:31 AMadam-mcneilly
08/09/2018, 1:47 PMmySet.toMutableSet()
and it's a little more readable. 🙂