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
None
if the option isNone
, otherwise callspredicate
with the wrapped value and conditionally returns the option orNone
.