where method

Maybe<t> where(
  1. bool predicate(
    1. t
    )
)
inherited

In case theres a value, keep it in case the predicate is true, otherwise return None.

Implementation

Maybe<T> where(bool Function(T) predicate /*!*/) => _self.visit<Maybe<T>>(
      just: (v) => predicate(v) ? _self : None<T>(),
      none: () => _self,
    );