arrow-core-data / arrow.core / Option / map
inline fun <B> map(f: (A) -> B):
Option
<B>
Returns a Some$B containing the result of applying $f to this $option’s value if this $option is nonempty. Otherwise return $none.
f
- the function to apply
Note
This is similar to flatMap
except here,
$f does not need to wrap its result in an $option.
See Also
Do you like Arrow?
✖