arrow-fx / arrow.fx / IO / Companion / effectEither
fun <E : Throwable, A> effectEither(f: suspend () -> EitherOf<E, A>): IO<A>
Delay a suspended effect which results in an Either.
Return a success IO when f returns Either.Right<A> or an error when f returns Either.Left<E>
fun <E : Throwable, A> effectEither(ctx: CoroutineContext, f: suspend () -> EitherOf<E, A>): IO<A>
Delay a suspended effect which results in an Either on provided CoroutineContext.
Return a success IO when f returns Either.Right<A> or an error when f returns Either.Left<E>
Do you like Arrow?
✖