Slide 43
Slide 43 text
Persistent collection modifications
val list = persistentListOf(1, 2, 3)
val newList = list.add(4)
println(newList) // [1, 2, 3, 4]
Modification operation returns new collection:
Under the hood, newList shares parts of data
structure with the original list