Comment on A Bit of Heresy: Functional Languages are OverratedparentComments−yummyfajitas16yf: (a -> m b) -> ... -> m ResultMaybe and Either are both monads and by convention Left errCode is the fail method of the Either monad. This will work exactly as you think it should. It will also work with, e.g., io actions that might fail.
Comments
f: (a -> m b) -> ... -> m Result
Maybe and Either are both monads and by convention Left errCode is the fail method of the Either monad. This will work exactly as you think it should. It will also work with, e.g., io actions that might fail.