Beware that `subList` is a view. If original list ...
# stdlib
o
Beware that
subList
is a view. If original list changes, then sublist also changes.
m
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.
There could also be a problem of keeping the whole list after using
subList
.
o
Right. There are many reasons why Kotlin defaults to "create a snapshot” behaviour 🙂