Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: