https://kotlinlang.org logo
#arrow
Title
# arrow
l

Lukasz Kalnik

06/30/2022, 12:32 PM
Can one use the
either {}
monad comprehension also outside suspending context? I want to use it in a non-suspending function, but it seems that
arrow.core.continuations.either
only has a suspending version of `invoke()`:
Copy code
public suspend operator fun <E, A> invoke(f: suspend EffectScope<E>.() -> A): Either<E, A> =
    effect(f).toEither()
s

stojan

06/30/2022, 1:12 PM
you can use
either.eager {}
from non suspend context
🙏 1
🧠 1
39 Views