Thanks Raul, they seem intriguing.  Do you know if they can be implemented and 
applied in J?  If so, could you give a simple illustration?




________________________________
From: Raul Miller <[email protected]>
To: Programming forum <[email protected]>
Sent: Wednesday, August 26, 2009 1:47:25 PM
Subject: Re: [Jprogramming] Recursive nesting, avoiding recursion

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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to