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