[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] macro question
From: |
Peter Keller |
Subject: |
Re: [Chicken-users] macro question |
Date: |
Thu, 12 Sep 2002 22:31:21 -0500 |
User-agent: |
Mutt/1.2i |
Sorry for posting against my own post, but I think I might have found a
solution:
(define-syntax testcase
(syntax-rules ()
((testcase var clauses ...)
(let ((var 42))
(cond ((not (and clauses ...))
(print var)))))))
(testcase var0 #t #t #t (set! var0 11) #f #t #t)
11
So, all I have to do now, is carefully arrange it so I can construct
a let-like environment like this:
(testcase ((var 42) (thing 22) (ans 0)) #t (set! ans (+ var thing)) #f)
66
In which case, I should look at the syntax definition of let.
Thanks for being a sounding board.
-pete