is a view. If original list changes, then sublist also changes.
m
mg6maciej
03/31/2017, 1:22 PM
Yes, I'm aware of the differences between it and `take`/`drop`. My model is truly immutable, always returning a copy of data class with all `val`s, that's why I wanted to try your immutable collections out.
mg6maciej
03/31/2017, 1:24 PM
There could also be a problem of keeping the whole list after using
subList
.
o
orangy
03/31/2017, 1:26 PM
Right. There are many reasons why Kotlin defaults to "create a snapshot” behaviour 🙂