map

inline fun <B> map(f: (A) -> B): Option<B>(source)

Returns a Some<$B> containing the result of applying $f to this $option's value if this $option is nonempty. Otherwise return $none.

See also

Parameters

f

the function to apply