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

Reply via email to