shift

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

Short-circuit the Effect computation with value R.

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

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