partition method

Tuple2<Iterable<T>, Iterable<T>> partition(
  1. bool f(
    1. T t
    )
)

Return a Tuple2 where the first element is an Iterable with all the elements of this Iterable that do not satisfy f and the second all the elements that do satisfy f.

Implementation

Tuple2<Iterable<T>, Iterable<T>> partition(bool Function(T t) f) =>
    Tuple2(filter((t) => !f(t)), filter(f));