These Monads pages derive pretty directly from one or another of the resources listed below. There are a lot more out there; these are what I found to be the most important, or most relevant, to what I am trying to do. This has been a learning experience for me; I've attempted to survey the history and current state of the art as relates to monads, and to codify the many known variations into Fantom language examples.
A Fantom monad library would hopefully be able to address the various examples shown here, but would need to address some tradeoffs between genericity and closure type safety; the comprehensions syntax issue comes up too, when you think about making monads generally useful in Fantom.
Anyway, some references:
- Eugenio Moggi
- Computational lambda-calculus and monads. In Symposium on Logic in Computer Science, Asilomar, California; IEEE, June 1989.
- Philip Wadler:
- Monads for functional programming
- Comprehending Monads
- Hutton and Meijer:
- Functional Pearls: Monadic Parsing in Haskell
- Monadic Parser Combinators
- Parsec: Direct Style Monadic Parser Combinators For The Real World
Clojure monad library and tutorials
