Filter
Returns the option
if it IsSome
and the predicate
function returns true when applied it. Otherwise, returns an Option<T>.None()
.
Parameter
Returns
Func<T, bool> predicate
Option<T> option
Option<T>
Usage
When the option value IsNone
or when the option value IsSome
and the predicate
function returns true
, this function will returns the option parameter as a result.
Otherwise, returns an Option<T>.None()
.
When the option value IsSome and predicate returns true
When the option value IsSome and predicate returns false
When the option value IsNone
Last updated
Was this helpful?