Effect CommunityEC
Effect Communityβ€’3w agoβ€’
2 replies
Kam

Seeking Elegant Alternatives for Frequent Pattern in Effect Typescript

There isn't any elegant alternative for this pattern, is there? I feel like that's a frequent pattern, and it feels awkward have to do it like that.
I would have thought something the Effect.when function would exist, but that one returns an Option, not a void.

The pattern I'm talking about is that of only executing something conditionally in a pipe.
image.png
Was this page helpful?