partition method
- bool f(
- T t
override
Return a Tuple2. If this Option
is a Some:
- if
f
applied to its value returnstrue
, then the tuple contains thisOption
as second value - if
f
applied to its value returnsfalse
, then the tuple contains thisOption
as first value Otherwise the tuple contains both None.
Implementation
@override
Tuple2<Option<T>, Option<T>> partition(bool Function(T t) f) =>
Tuple2(filter((a) => !f(a)), filter(f));