partitionIndexed
inline fun <T> Iterable<T>.partitionIndexed(predicate: (index: Int, T) -> Boolean): Pair<List<T>, List<T>>
Splits this iterable into a pair of lists using predicate, which also receives each element's index.
The first list holds elements for which predicate returned true, the second the rest. Encounter order is preserved in both lists.