Hacker News new | ask | show | jobs
by madhadron 2232 days ago
I've had good luck with explaining it as a characteristic of a programming language. In a language consisting of sequences of statements with bindings and function calls, we expect that

f(x)

is the same as

a = x; f(a)

and the same as

g = f; g(x);

That's the monad laws. Whatever craziness you want to put in the semantics, those are properties you probably would like to preserve in your language.

1 comments

I think I understand monads less now.
Do you really understand them less, or has it dislodged ideas that you thought were true? Moving towards zero is not always decreasing.