edwardwongtl
03/12/2018, 9:54 AMval list_a = listOf<T>(..)
val list_b = listOf<T>(...)
list_a.clear()
list_a.addAll(list_b)
In this case list_a will only contain shallow copies, using .copy()
seems to be able to give me a new instance( but I know empty .copy
should return the same instance).