4 ms·
That code that "is getting pretty ugly" seemed ok to me.
by ape4 6y ago
That code that "is getting pretty ugly" seemed ok to me.
- sfvisser 6y agoSure, that example wasn’t that bad. But if your specific monad is somewhat more complicated - e.g state, either, promise - and you’re using it all over the place all that boilerplate is going to obscure your domain logic pretty quickly. Monads can help readability by focusing on the composition of your domain logic instead of writing out the same low-level boilerplate over and over again.