Re:A Bit of Heresy: Functional Languages are Overrated
by yummyfajitas on Wednesday June 30, 2010 @12:36AM
(#1473922)
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.
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.