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
.