kmongo / kotlin.collections / com.mongodb.client.MongoIterable / partition

partition

inline fun <T> MongoIterable<T>.partition(crossinline predicate: (T) -> Boolean): Pair<List<T>, List<T>> (source)

Splits the original collection into pair of lists, where first list contains elements for which predicate yielded true, while second list contains elements for which predicate yielded false.