const ... = Effect.gen(function* (_) {
const booleanValue = someFunctionReturningABoolean()
if(!booleanValue){
// Can I return here?
yield* _(Effect.fail("some funny error"))
// return yield* _(Effect.fail("some funny error"))
}
// in this ways I knoe `booleanValue` is true here
...
// and the, should I return the final effect?
return yield* _(someEffect)
})
const ... = Effect.gen(function* (_) {
const booleanValue = someFunctionReturningABoolean()
if(!booleanValue){
// Can I return here?
yield* _(Effect.fail("some funny error"))
// return yield* _(Effect.fail("some funny error"))
}
// in this ways I knoe `booleanValue` is true here
...
// and the, should I return the final effect?
return yield* _(someEffect)
})