Mar. 7th, 2006
crash course in monads, for programmers
Mar. 7th, 2006 02:22 pmMonads in programming seem to be the most mysterious notion of the century. I find two reasons for this:
* lack of familiarity with category theory;
* many authors carefully bypass any mention of categories.
It's like talking about electricity without using calculus. Good enough to replace a fuse, not good enough to design an amplifier.
This crash course starts with an easy introduction to categories and functors, then we define a monad, then give some basic examples of monads in categories,
then present monadic terminology as used in programming languages.
P.S. Your response is extremely welcome. I want to make this text as easy as is humanly possible.
* lack of familiarity with category theory;
* many authors carefully bypass any mention of categories.
It's like talking about electricity without using calculus. Good enough to replace a fuse, not good enough to design an amplifier.
This crash course starts with an easy introduction to categories and functors, then we define a monad, then give some basic examples of monads in categories,
then present monadic terminology as used in programming languages.
P.S. Your response is extremely welcome. I want to make this text as easy as is humanly possible.