Handling Multiple Errors in a Similar Way
Question: What if you wanted to handle two errors the same way, how would you go about doing that?
Something along the lines of maybe?:
The docs suggests two ways that both introduce code duplication (if you dont abstract the logic out in a function). But if the logic I want to not have duplicated is something as simple as e.g. logging the error, then it's overkill having to define a function for it:
Note: Maybe I wont ever run into this in practice, it was just something I thought about when reading the docs
Something along the lines of maybe?:
The docs suggests two ways that both introduce code duplication (if you dont abstract the logic out in a function). But if the logic I want to not have duplicated is something as simple as e.g. logging the error, then it's overkill having to define a function for it:
Note: Maybe I wont ever run into this in practice, it was just something I thought about when reading the docs
A fully-fledged functional effect system for TypeScript with a rich standard library

