Monads & Gonads

Eric Normand's Newsletter
Software design, functional programming, and software engineering practices
Over 5,000 subscribers

Reference: Monads & Gonads

Douglas Crockford gives his version of the obligatory monad tutorial. His version is in Javascript with hopes of needed demystification.

I have to appreciate the freshness of his approach. He says a monad is just an object with certain properties (the monad laws). That's a great way to explain it in an object-oriented context. Objects are the unit of encapsulation. Monads serve the purpose of encapsulating state and allowing structured access to that state.

There is one thing that bothers me about his presentation. He uses mutable objects. I guess that is to be expected in Javascript. But mutating state in a monad seriously limits their possibilities, as mutation does in most uses.

Either way, it is an entertaining watch and a good explanation of monads. Perhaps the most down-to-earth I have seen.

Sean Allen
Sean Allen
Your friendly reminder that if you aren't reading Eric's newsletter, you are missing out…
👍 ❤️
Nicolas Hery
Nicolas Hery
Lots of great content in the latest newsletter! Really glad I subscribed. Thanks, Eric, for your work.
👍 ❤️
Mathieu Gagnon
Mathieu Gagnon
Eric's newsletter is so simply great. Love it!
👍 ❤️