william
10/20/2020, 11:53 PMMarc Knaup
10/21/2020, 1:32 AM.scan(emptyList<Foo>()) { list, element -> list + element }
william
10/21/2020, 12:29 PMephemient
10/21/2020, 1:37 PMMarc Knaup
10/21/2020, 1:50 PMMutableList
instead of array though and let the stdlib handle the expansion. ArrayList
implementation is incredibly fast.ephemient
10/21/2020, 1:52 PM.subList()
to avoid copying.subList()
values to break with ConcurrentModificationExceptionMarc Knaup
10/21/2020, 1:53 PM