Hi guys,
According to you, which language do you think would be the best for implementing monads (Python/Ruby/LISP)?,also can anyone tell me some possible uses of monads (please give examples),like exceptions?
Thanks in advance
Hi guys,
According to you, which language do you think would be the best for implementing monads (Python/Ruby/LISP)?,also can anyone tell me some possible uses of monads (please give examples),like exceptions?
Thanks in advance
For examples, see Philip Wadler, "Monads for functional programming".
In order of preference:
Monads in order of decreasing simplicity:
All About Monads - legendary tutorial that lists all the standard monads and gives a lot of real-world examples.
Popular monads that you can meet even in the mainstream languages are Maybe
, List
and Continuation
.
Some people also think that jQuery itself is a monad (as it follows the monadic axioms).
As for the language choice, Haskell and its derivatives are using monads as a fundamental concept, however, as an option, constructing monads is possible in a lot of modern languages. In order to familiarize with the monad concept I'd better choose the language I'm the most comfortable with.
Here are some tutorial that use clojure. Monads are implemented in a library.