//arrow-core/arrow.core/Option/flatMap

flatMap

common inline fun <B> flatMap(f: (A) -> Option<B>): Option<B>

Returns the result of applying $f to this $option’s value if this $option is nonempty. Returns $none if this $option is empty. Slightly different from map in that $f is expected to return an $option (which could be $none).

See also

common

   
arrow.core.Option  

Parameters

common

   
f the function to apply

Do you like Arrow?

Arrow Org
<