Like a sequence A, B, C where if A errors you don’t continue to B or C but if A is ok then you just continue doing B and so on. In the end you end up with the result or errors. Am I wrong to assume this?
The Either monad (also known as Result) provides Go-like error handling, but automated. You only check manually for errors after the last call, the monad handles the process.
But this is just one example of a monad, there are many more.
Isn’t it just like error handled code in Golang?
Like a sequence A, B, C where if A errors you don’t continue to B or C but if A is ok then you just continue doing B and so on. In the end you end up with the result or errors. Am I wrong to assume this?
The Either monad (also known as Result) provides Go-like error handling, but automated. You only check manually for errors after the last call, the monad handles the process.
But this is just one example of a monad, there are many more.