passsy
03/25/2019, 4:36 PMtoList or toMap. On the other hand asSequence and asIterable. From my testing the to methods copy the collection where the as methods create views on the data. Which means if the collections changes, the views also have access to the mutated data.
Is this a not documented rule? Would it be "wrong" if one of my own asCustomList copies the data instead of creating a view? Should I call it toCustomList?ilya.gorbunov
03/25/2019, 4:42 PM