porting native code to Kotlin, if I want to move a group of elements in an Arraylist up front, what's my best option? C++ uses
stable_partition
Copy code
Move elements for which a predicate is true to the beginning
* of a sequence, preserving relative ordering.
elect
04/10/2021, 2:57 PM
I'm thinking about creating a new Arraylist, put there all the element as I find (and remove) them (from the original list), then inserting them all up front, one by one in the same order