3 ms·
No, 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 cas
by 08-15 6y ago
No, 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.