partition method

Pair<Iterable<E>, Iterable<E>> partition(
  1. bool test(
    1. E element
    )
)

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));