poohbar
10/18/2018, 7:02 PMtakeWhile
to stop pulling items from a sequence, but I need to get the first one that evaluated to false and then stop
generateSequence(seed) { fetchSomeList }
.takeWhile { it.isTruncated } // truncated means that there is a next page
This will NOT give me the last page (because it's not truncated). How would you modify this to make it work?