toOption

open suspend fun toOption(orElse: suspend (R) -> Option<A>): Option<A>

fold the Cont into an Option. Where the shifted value R is mapped to Option by the provided function orElse, and result value A is mapped to Some.

Sources

common source
Link copied to clipboard