5 ms·
This is exactly right. We habitually lift `Maybe`/`Option` values into a more explicit and comprehensive `Either`/`Result` type in our programs. It's pretty com
by coolsunglasses 7y ago
This is exactly right. We habitually lift `Maybe`/`Option` values into a more explicit and comprehensive `Either`/`Result` type in our programs. It's pretty common to have an error type hierarchy in the program too, so you could find yourself chaining from one `Either e` to another. There are libraries in Haskell and Rust for regularizing/code-gen'ing these patterns.