3 ms·
Congratulations: monads are not that hard. That said, it's often preferred to use Either<Success,Error> because then you can try to explain what went wrong. A
by KirinDave 8y ago
Congratulations: monads are not that hard.
That said, it's often preferred to use Either<Success,Error> because then you can try to explain what went wrong. A Maybe cascade failing can be pretty mysterious when you start to compose them, and you're deliberately creating something your optimizer will inline into an difficult-to-debug straight line of code.
- hderms 8y agoMaybe is perhaps suitable for things that can go wrong in only one specific way, but how many of those are there? Agreed that Either is preferable