DEV Community

Discussion on: What dev topic do you think you should understand, but don't?

Collapse
 
madhadron profile image
Fred Ross

So, for monads, I wrote up How to think about monads some time back. Here's the gist of it:

In most imperative programming languages, I would expect that writing a = 5; f(a); is the same as writing f(5);. And, a little more obscurely, that g = f; g(5); is the same as f(5);.

There are lots of particular languages that obey those rules, but, just like Java has an interface Map and lots of particular classes that implement it, we want a name for the abstract thing that is a language with those properties. That name is "monad."