filterMap<Z> method

  1. @override
Option<Z> filterMap<Z>(
  1. Option<Z> f(
    1. T t
    )
)
override

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

Implementation

@override
Option<Z> filterMap<Z>(Option<Z> Function(T t) f) => f(_value).match(
      () => const Option.none(),
      Some.new,
    );