LastExceed
09/12/2019, 9:02 AMmyList.dropLast(myList.size - 1 - myList.indexOf(thatObject)) ) but none that really satisfies me in terms of readability. can you guys give me some suggestions? I figured the best way would involve myList.retainAll() somehow but i couldnt find a good way to make use of itwbertan
09/12/2019, 9:18 AMLastExceed
09/12/2019, 9:24 AMObservableList from TornadoFX which doesn't have a .takeUntilItem() function unfortunately. I thought it had the same functions as a normal MutableList but apparently notLastExceed
09/12/2019, 9:26 AMmyList.retainAll(myList.takeUntilItem(thatItem)) would have been what I'm looking for, though I'm still not sure whether thats the best approach as it seems inefficientLastExceed
09/12/2019, 9:31 AMmyListwbertan
09/12/2019, 9:35 AMtakeUntilItem was my extensionwbertan
09/12/2019, 9:35 AMlist.take(min(list.indexOf(item) + 1, list.size))LastExceed
09/12/2019, 9:39 AMObservableList has a function .remove(from: Int, to: Int): Unit which is exactly what i need. still, thanks for your helpwbertan
09/12/2019, 9:51 AM