This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
define-syntax and context
- From: Christof Lehmann <clehmann at vub dot de>
- To: Kawa Mailingliste <kawa at sources dot redhat dot com>
- Date: Tue, 09 Mar 2004 10:34:17 +0100
- Subject: define-syntax and context
- Organization: VUB GmbH
Hello,
I want build a scheme construct like this:
(define-syntax myfunc
(syntax-rules ()
((myfunc body-expr)
(lambda (left right) body-expr))))
(display ((myfunc (+ right left)) 3 5))
I get allways the following exception:
gnu.mapping.UnboundSymbol: Unbound symbol right
at
gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.java:638)
...
After reading following introduction to scheme
http://www.cs.utexas.edu/users/wilson/schintro/schintro_130.html#SEC186
I have thought it should work.
I have two question:
- Is my construct correct in scheme?
- if not, how should I express this?
Thanks
Christof
(define-syntax myfunc
(syntax-rules ()
((myfunc body-expr)
(lambda (left right) body-expr))))
(display ((myfunc (+ right left)) 3 5))