Re:Functional exceptionless error-handling with optional and...
by kccqzy on Sunday December 03, 2017 @05:44PM
(#15840099)
The Maybe monad doesn’t have this feature. It’s purposefully simple: the value is either present or absent.
If you want different errors, use the Either monad. It basically means either the value you want is there, or it’s not there but there’s an explanation. Chaining works just as well for the Either monad.
If you want different errors, use the Either monad. It basically means either the value you want is there, or it’s not there but there’s an explanation. Chaining works just as well for the Either monad.