Using Effect.iterate as an alternative to ReadonlyArray.reduce for effects
I have this code:
but now I changed the
I was looking into using Effect.iterate (or Effect.forEach + a Ref to keep statee) to achieve this, but not sure if its the most adequate way to do it. Is there any reduce-like API for effects?
but now I changed the
computeProjection to now return a Effect Effect.Effect<never, InvalidEventOrderException, P> and therefore I can no longer use ReadonlyArray.reduce.I was looking into using Effect.iterate (or Effect.forEach + a Ref to keep statee) to achieve this, but not sure if its the most adequate way to do it. Is there any reduce-like API for effects?
