News for hackers. Stuff that matters.
Re:Lisp and Haskell (2015) by dunefox on Thursday October 08, 2020 @10:36AM (#24719427)
`Either` would be much better, no?
Re:Lisp and Haskell (2015) by 08-15 on Thursday October 08, 2020 @10:52AM (#24719598)
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.