I’m wondering if there is a preferred way of passing values down the steps of a dry-transaction? Two use-cases I have in mind:
- All the steps need to check the params passed to the transaction at start.
- Each step wants to add its own results to a pipeline, while also transferring its inputs to the next step.
I’m currently doing something that feels clumsy: each step takes a hash of inputs, and then adds to that hash and passes it onwards in a Right monad. Alternatives like using instance level variables don’t sound appealing either.
How do others deal with this?