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. -Dan On Fri, Apr 13, 2012 at 13:40, Daniel Leslie <[email protected]> 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. > > Sorry! > > -Dan > > > On Fri, Apr 13, 2012 at 13:06, Jörg F. Wittenberger < > [email protected]> 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: >>> >>> (define-monad >>> <id> >>> (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 >> consistent. >> >> One more question: would it be feasible to support >> multi-valued monads like this made up one: >> >> (define-monad >> <complex-id> >> (lambda (r i) (values r i)) >> (lambda (f r i) (f r i))) >> >> best regards >> >> /Jörg >> >> ..... >> > >
_______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
