function doSomething(...args: any[]) {
return Effect.gen(function* () {
const didSomething = yield* something()
// did something more
const job = yield* SomeJob.dispatch(...some_args)
// did something more
})
}
const program = Effect.gen(function* () {
const doSomething_1 = yield* doSomething(1)
const doSomething_2 = yield* doSomething(2)
const doSomething_3 = yield* doSomething(3)
const queueJob_1 = yield* queueJob(doSomething_1, doSomething_2, doSomething_3)
const doSomething_4 = yield* doSomething(4)
return something
})
function doSomething(...args: any[]) {
return Effect.gen(function* () {
const didSomething = yield* something()
// did something more
const job = yield* SomeJob.dispatch(...some_args)
// did something more
})
}
const program = Effect.gen(function* () {
const doSomething_1 = yield* doSomething(1)
const doSomething_2 = yield* doSomething(2)
const doSomething_3 = yield* doSomething(3)
const queueJob_1 = yield* queueJob(doSomething_1, doSomething_2, doSomething_3)
const doSomething_4 = yield* doSomething(4)
return something
})