4 ms·
`Either` would be much better, no?
by dunefox 6y ago
`Either` would be much better, no?
- 08-15 6y agoNo, because `Either` is a `Foldable`, too. I know, not what you meant. But a custom sum type would not only allow you to return multiple different failure cases, you also wouldn't give it a `Foldable` instance with surprising semantics. Plain old data types are seriously underrated these days.