Returns None if the option is None, otherwise calls predicate with the wrapped value and conditionally returns the option or None.
None
predicate
Predicate.
Option to evaluate.
Some<T> if the predicate returns true, or None if the predicate returns false.
Some<T>
true
false
Returns
Noneif the option isNone, otherwise callspredicatewith the wrapped value and conditionally returns the option orNone.