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."
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 writingf(5);
. And, a little more obscurely, thatg = f; g(5);
is the same asf(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."