On Wed, Aug 26, 2009 at 12:57 PM, Jose Mario Quintana<[email protected]> wrote: > Maybe I am still functionally illiterate because I have no idea what > those “monads” are; yet, I am able to appreciate Paul Graham's metaphor.
As I understand them: Monads are a way of transforming a bunch of function definitions -- implicitly adding an additional item to each of their arguments and results. For this to be useful, you also need a way of giving the definitions access to this additional argument and for them to provide a way of overriding the default definition of this result (and the default should be the identify function on that item). [Hypothetically speaking, access to the monad element would be invalid if it was used without relevant monad -- but "no operation" semantics could also be defined.] Once you have monads, you can then pretend I/O is a monad (you can use the same syntax and notation to express I/O as you would for a real monad). -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
