filter

inline fun filter(predicate: (A) -> Boolean): Option<A>(source)

Returns this $option if it is nonempty '''and''' applying the predicate $p to this $option's value returns true. Otherwise, return $none.

Parameters

predicate

the predicate used for testing.