chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] macrolet


From: Lui Fungsin
Subject: Re: [Chicken-users] macrolet
Date: Fri, 7 Mar 2008 13:42:29 -0800

I hit the send button without actually trying out the code...

This still doesn't do it because the form is (return-from proc-name value)
and the continuation expects only the value argument.

On 3/7/08, Lui Fungsin <address@hidden> wrote:
> Ah, a bad example ...
>
> You're right that this should work:
>
> (define-macro (defun name args . body)
>  `(define ,name
>     (lambda ,args
>       (call/cc
>        (lambda (return-from)
>          ,@body)))))
>
> The reason why I wrote it that way is entirely because of my CL mentality:
> you have to do (funcall return-from ...) in CL instead of just (return-from 
> ...)
>
> And to write that similar macro in CL return-from has to be a special
> form instead of a function.
>
> But anyway, I still missed macrolet ... :-)
>




reply via email to

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