On 5/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:
Here's a cheap-and-dirty way to do it; it's not perfect (especially
because there's some redundant typing involved) but you can have it
today:
(define-macro (eval-with-locals locals expr)
`((eval '(lambda ,locals ,(eval expr))) ,@locals))
Except that this fails:
(let ((x 10)
(y 100)
(expr '(+ x y z)))
(eval-with-locals (x y) expr))
==> Error: during expansion of (eval-with-locals ...) - unbound variable: expr
...and this is what you really want to work. Sorry, don't have time to
fix it right now. :-(
G
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users