filter method

  1. @override
Option<T> filter(
  1. bool f(
    1. T t
    )
)
override

If this Option is a Some and calling f returns true, then return this Some. Otherwise return None.

Implementation

@override
Option<T> filter(bool Function(T t) f) => f(_value) ? this : Option.none();