3 ms·
The mnemonic for how Either fits into the exception monad in Haskell is the result is either Right (correct) or Left (sinister). It is tainted by the old prejud
by fanf2 12y ago
The mnemonic for how Either fits into the exception monad in Haskell is the result is either Right (correct) or Left (sinister). It is tainted by the old prejudice against left-handed people.
- Dewie 12y agoI know, but in Rust's case it was more straightforward to call it Ok/Err since that was the majority use-case. Personally I prefer Either, since then you have a more generic sum type, just like the tuple type is a more generic product type (and if I'm using the terminology correctly).