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.

Parameters

f

the function to apply

See also