arrow-core / arrow.core.extensions / OptionMonad

OptionMonad

interface ~~OptionMonad~~ : Monad<ForOption>, OptionApplicative Deprecated: Monad typeclass is deprecated and will be removed in 0.13.0. Use concrete methods on Option

Properties

fx open val fx: MonadFx<ForOption>

Functions

ap open fun <A, B> OptionOf<A>.ap(ff: OptionOf<(A) -> B>): Option<B>
flatMap open fun <A, B> OptionOf<A>.flatMap(f: (A) -> OptionOf<B>): Option<B>
just open fun <A> just(a: A): Option<A>
map open fun <A, B> OptionOf<A>.map(f: (A) -> B): Option<B>
select open fun <A, B> OptionOf<Either<A, B>>.select(f: OptionOf<(A) -> B>): OptionOf<B>
tailRecM open fun <A, B> tailRecM(a: A, f: (A) -> OptionOf<Either<A, B>>): Option<B>

Inheritors

OptionMonadError interface ~~OptionMonadError~~ : MonadError<ForOption, Unit>, OptionMonad
OptionMonadPlus interface ~~OptionMonadPlus~~ : MonadPlus<ForOption>, OptionMonad, OptionAlternative

Do you like Arrow?

Arrow Org
<