I want an Effect.all() which receives a map
Hi folks,
I'm sort of allergic to the
First, some context. Please forgive my noob questions and hardline fp stance.
My ideal app architecture is that my application, or at least each request is simply a purely-composed
Functional core, imperative shell. A classic architecture, and theoretically a no-brainer in
My questions:
1) given the ubiquity of the
I remember maestro Ethan being quite explicit in a talk about gen and pipeline syntax being essentially toggleable in the docs, but I no longer see any such thing. It looks like I have to call
2) if the answer to #1 is yes, then is there some kind of
Usage:
The
I've scoured the docs and can't find any evidence of what I'm after, though the use case seems clear?
Thanks for your time + help!
Edit: SOLVED thanks to @Tim Smart for saving my life:
I'm sort of allergic to the
Effect.gen() syntax.First, some context. Please forgive my noob questions and hardline fp stance.
My ideal app architecture is that my application, or at least each request is simply a purely-composed
pipe() function, assembled imperatively at the very top level in my main function, with all errors and effectful behaviour handled at that top level.Functional core, imperative shell. A classic architecture, and theoretically a no-brainer in
Effect.My questions:
1) given the ubiquity of the
Effect.gen() / imperative-style syntax, is pipeline-only style Effect even possible?I remember maestro Ethan being quite explicit in a talk about gen and pipeline syntax being essentially toggleable in the docs, but I no longer see any such thing. It looks like I have to call
gen, use yield*syntax, and write much more imperative code than I want to.2) if the answer to #1 is yes, then is there some kind of
Effect.all which can receive a value, like a map, which is then combined with one or more of the elements in the all array/object?Usage:
The
Effect.gen syntax would make bypassing this issue fairly easy by just having the transformationResult in block scope for use by an Effect.all, but in a strict pipeline, it doesn't seem to be possible.I've scoured the docs and can't find any evidence of what I'm after, though the use case seems clear?
Thanks for your time + help!
Edit: SOLVED thanks to @Tim Smart for saving my life:
