[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] [ANN] Monad Egg

From: Daniel Leslie
Subject: Re: [Chicken-users] [ANN] Monad Egg
Date: Fri, 13 Apr 2012 13:49:28 -0700

Oh good,

I thought there might have been a serious logic error to fix; but it turns out the typo was just in the wiki.

It's corrected now.


On Fri, Apr 13, 2012 at 13:40, Daniel Leslie <address@hidden> wrote:
Oh, the identity monad itself is completely useless.

It's like an identity transform for a matrix. It's intended to do nothing.

Otherwise, the exchange of parameters appears to have been a typo. I'll fix that when I get home tomorrow.



On Fri, Apr 13, 2012 at 13:06, Jörg F. Wittenberger <address@hidden> wrote:
On Apr 13 2012, Daniel Leslie wrote:

I have written a small egg to ease the usage of lazily-evaluated monads.

Very welcome!

But there's one thing I find confusing.

You posting continues with this example identical to the one in
the "Basic Monads" section.

For example, after defining the identity monad:

 (lambda (a) a)
 (lambda (a f) (f a)))

However the "Description" section introduces the bind function
with the "f" and "a" parameters exchanged:

For instance, the identity monad is:

1. Bind: (lambda (f a) (f a))

So far I fail to see a reason.

Short of other arguments I'd prefer the latter one as more

One more question: would it be feasible to support
multi-valued monads like this made up one:

 (lambda (r i) (values r i))
 (lambda (f r i) (f r i)))

best regards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]