chicken-users
[Top][All Lists]
Advanced

[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 14:14:45 -0700

Agh, sorry about the smattering of replies. I'm multi-tasking heavily today.

(define-monad
 <complex-id>
 (lambda (r i) (values r i))
 (lambda (f r i) (f r i)))

Why not:

(define-monad <cid> (lambda (a) (values (car a) (cdr a)))
    (lambda (a f) (f (car a) (cdr a))))

That's how the <logger> monad example goes about things. The parameter list itself is just compacted into a pair, and passed through the unit and bind functions.

I suppose I could extend it to support a full parameter list... It's certainly worth considering.

-Dan 

reply via email to

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