shift

open suspend override fun <B> shift(r: Throwable): B(source)

Short-circuit the EagerEffect computation with value R.

import arrow.core.continuations.eagerEffect
import io.kotest.assertions.fail
import io.kotest.matchers.shouldBe

fun main() {
eagerEffect<String, Int> {
shift("SHIFT ME")
}.fold({ it shouldBe "SHIFT ME" }, { fail("Computation never finishes") })
}