tieskedh
09/10/2017, 1:36 PMedvin
09/10/2017, 2:00 PMtieskedh
09/10/2017, 2:05 PMedvin
09/10/2017, 2:07 PMedvin
09/10/2017, 4:19 PMedvin
09/10/2017, 4:23 PMedvin
09/10/2017, 4:24 PMtieskedh
09/10/2017, 7:04 PMedvin
09/10/2017, 7:33 PMdr.fornax
09/10/2017, 7:47 PMdr.fornax
09/10/2017, 8:01 PMdr.fornax
09/10/2017, 8:01 PMdr.fornax
09/10/2017, 8:04 PMdr.fornax
09/10/2017, 8:20 PMdr.fornax
09/10/2017, 8:20 PMdr.fornax
09/10/2017, 8:23 PMtieskedh
09/10/2017, 9:00 PMasSequence().filter(predicate).toList().asSequence().foreach{}
I get the idea, but I believe kotlin does not use sequences in parallel
Having said that, I think there is no need for a sequence. This means that the same result can be reached by using filter(predicate).foreach{}
Am I right?tieskedh
09/10/2017, 9:32 PMtieskedh
09/10/2017, 9:55 PMthomasnield
09/10/2017, 11:07 PMTableView
extension functions still.... have you considered the ConcurrentModficiationException
? Again, that has nothing to do with concurrency per se, but rather you are iterating the list while modifying it.thomasnield
09/10/2017, 11:10 PMasSequence()
in the line snippit you posted is extraneous though and not necessary.thomasnield
09/10/2017, 11:10 PMtoList()
is critical to prevent the ConcurrentModificationException
tieskedh
09/11/2017, 12:06 AMasSequence.filter.tolist
not the same as .filter
without asSequence
and .tolist
so mutableList.filter(it.length < 5).forEach(mutableList.remove(it)
thomasnield
09/11/2017, 12:07 AMthomasnield
09/11/2017, 12:08 AMthomasnield
09/11/2017, 12:09 AMthomasnield
09/11/2017, 12:09 AMthomasnield
09/11/2017, 12:09 AMtieskedh
09/11/2017, 12:10 AM