ilya.gorbunov
02/13/2018, 2:59 PMhho
02/13/2018, 3:14 PMlistOf(…)
, mapOf(…)
, setOf(…)
already produce immutable collections?kevinmost
02/13/2018, 3:18 PMlist1 + list2
creates a new ArrayList
and does addAll
twice, once with each list. With immutable collections, presumably there'd be a ConcatenatedList
implementation that just returns a view of the two underlying collections because it's guaranteed they'd never be mutatedhho
02/13/2018, 3:18 PMkevinmost
02/13/2018, 3:19 PMjkbbwr
02/13/2018, 3:59 PMroberto.guerra
02/13/2018, 5:39 PMPurely Functional Data Structures
by Okasaki https://www.cs.cmu.edu/~rwh/theses/okasaki.pdfdave08
02/13/2018, 8:42 PM