partition

open fun <E> partition(@NonNull collection: Collection<E>, @NonNull filter: (E) -> Boolean): Pair<List<E>, List<E>>

Partition the collection into two Arrays. The first array has all elements which passed the filter, the second one has the rest

Return

A Pair containing the two arrays