partition method
Splits the original collection into Pair of iterables, where first
Iterable
contains elements for which test
yielded true, while second
Iterable
contains elements for which test
yielded false.
Implementation
Pair<Iterable<E>, Iterable<E>> partition(bool Function(E element) test) =>
Pair(where(test), whereNot(test));