4 ms·
i don't know why you're getting downvoted because spelling out the pragmatics of monads using Maybe is exactly the right way to teach people about monads and gp
by mlevental 8y ago
i don't know why you're getting downvoted because spelling out the pragmatics of monads using Maybe is exactly the right way to teach people about monads and gp is committing monad fallacy (though doing a nice job regardless of explaining to people like myself who already know a little)
https://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/ https://byorgey.wordpress.com/2009/01/12/abstraction-intuiti...
- tmountain 8y agoAgreed, in fact, I hesitated to even chime in because there's already so much "dust" around monads that I question the value in adding to the storm. That said, I think Steve Diehl has some great advice regarding understanding monads in his "What I Wish I Knew When Learning Haskell" document. Eightfold Path to Monad Satori Much ink has been spilled waxing lyrical about the supposed mystique of monads. Instead, I suggest a path to enlightenment: Don't read the monad tutorials. No really, don't read the monad tutorials. Learn about Haskell types. Learn what a typeclass is. Read the Typeclassopedia. Read the monad definitions. Use monads in real code. Don't write monad-analogy tutorials. In other words, the only path to understanding monads is to read the fine source, fire up GHC, and write some code. Analogies and metaphors will not lead to understanding.