arrow-fx-rx2 / arrow.fx.rx2 / MaybeK

MaybeK

data class MaybeK<out A> : MaybeKOf<A>

Constructors

<init> MaybeK(maybe: Maybe<out A>)

Properties

maybe val maybe: Maybe<out A>

Functions

ap fun <B> ap(fa: MaybeKOf<(A) -> B>): MaybeK<B>
bracketCase A way to safely acquire a resource and release in the face of errors and cancellation. It uses ExitCase to distinguish between different exit cases when releasing the acquired resource.fun <B> bracketCase(use: (A) -> MaybeKOf<B>, release: (A, ExitCase<Throwable>) -> MaybeKOf<Unit>): MaybeK<B>
continueOn fun continueOn(ctx: CoroutineContext): MaybeK<A>
equals fun equals(other: Any?): Boolean
exists fun exists(predicate: Predicate<A>): Boolean
filterMap fun <B> filterMap(f: (A) -> Option<B>): MaybeK<B>
flatMap fun <B> flatMap(f: (A) -> MaybeKOf<B>): MaybeK<B>
fold fun <B> fold(ifEmpty: () -> B, ifSome: (A) -> B): B
foldLeft fun <B> foldLeft(b: B, f: (B, A) -> B): B
foldRight fun <B> foldRight(lb: Eval<B>, f: (A, Eval<B>) -> Eval<B>): Eval<B>
forall fun forall(p: Predicate<A>): Boolean
hashCode fun hashCode(): Int
isEmpty fun isEmpty(): Boolean
map fun <B> map(f: (A) -> B): MaybeK<B>
nonEmpty fun nonEmpty(): Boolean
runAsync fun runAsync(cb: (Either<Throwable, A>) -> MaybeKOf<Unit>): MaybeK<Unit>
suspended suspend fun suspended(): A?

Companion Object Functions

async Creates a MaybeK that’ll run MaybeKProc.fun <A> async(fa: MaybeKProc<A>): MaybeK<A>
asyncF fun <A> asyncF(fa: MaybeKProcF<A>): MaybeK<A>
cancelable Creates a MaybeK that’ll run MaybeKProc.fun <A> cancelable(fa: ((Either<Throwable, A>) -> Unit) -> CancelToken<ForMaybeK>): MaybeK<A>
cancelableF fun <A> cancelableF(fa: ((Either<Throwable, A>) -> Unit) -> MaybeKOf<CancelToken<ForMaybeK>>): MaybeK<A>
defer fun <A> defer(fa: () -> MaybeKOf<A>): MaybeK<A>
invoke operator fun <A> invoke(fa: () -> A): MaybeK<A>
just fun <A> just(a: A): MaybeK<A>
raiseError fun <A> raiseError(t: Throwable): MaybeK<A>
tailRecM tailrec fun <A, B> tailRecM(a: A, f: (A) -> MaybeKOf<Either<A, B>>): MaybeK<B>

Extension Functions

handleErrorWith fun <A> MaybeK<A>.handleErrorWith(function: (Throwable) -> MaybeKOf<A>): MaybeK<A>
unsafeRunAsync fun <A> MaybeK<A>.unsafeRunAsync(cb: (Either<Throwable, A>) -> Unit): Unit
unsafeRunSync fun <A> MaybeK<A>.unsafeRunSync(): A

Companion Object Extension Functions

concurrent fun MaybeK.Companion.concurrent(dispatchers: Dispatchers<ForMaybeK> = MaybeK.dispatchers()): Concurrent<ForMaybeK>
fx fun <A> MaybeK.Companion.fx(c: suspend ConcurrentSyntax<ForMaybeK>.() -> A): MaybeK<A>

Do you like Arrow?

Arrow Org
<