option

inline fun <A> option(block: OptionRaise.() -> A): Option<A>(source)

Runs a computation block using Raise, and return its outcome as Option.

  • Some represents success,

  • None represents logical failure.

This function re-throws any exceptions thrown within the Raise block.

Read more about running a Raise computation in the Arrow docs.