gsala
03/01/2023, 1:37 PMclass ImmutableList<T>(list: List<T>) : List<T> by list.toList()LeoColman
03/01/2023, 2:50 PMtoList will return you a new listLeoColman
03/01/2023, 2:50 PMLoney Chou
03/01/2023, 4:11 PMtoList will give you a new ArrayListChris Fillmore
03/02/2023, 2:25 AMgsala
03/03/2023, 10:28 AMtoList. What about declaring it as:
class ImmutableList<T>(list: List<T>) : List<T> by ArrayList(list)gsala
03/03/2023, 10:28 AMtoList but that’s probably alright