I'm a bit puzzled by the generator syntax of Effect.gen
export const program = Effect.gen(function* (_) { const a = yield* _(task1) const b = yield* _(task2) const n1 = yield* _(divide(a, b)) const n2 = increment(n1) return `Result is: ${n2}`})
export const program = Effect.gen(function* (_) { const a = yield* _(task1) const b = yield* _(task2) const n1 = yield* _(divide(a, b)) const n2 = increment(n1) return `Result is: ${n2}`})
won't it be more convenient to check if the passed object has an Symbol.asyncIterator assigned to it ? (e.g. is a generator function), and apply one if it's not.
This way we should be able to emulate arrow generators from