arrow-core-data / arrow.core / Option / mapNotNull
inline fun <B> mapNotNull(f: (A) -> B?):
Option
<B>
Returns $none if the result of applying $f to this $option’s value is null. Otherwise returns the result.
f
- the function to apply.
Note
This is similar to .flatMap { Option.fromNullable(null)) }
and primarily for convenience.
Do you like Arrow?
✖