shift
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") })
}
Content copied to clipboard