From: Andreas R. <and...@pv...> - 2009-05-05 22:31:52
|
Hello! I'm trying to port some scheme code from guile to jscheme, and have run into som problems with macros. This is the function that I would like to port to jscheme: (defmacro def-save-var (nm value) `(begin (define ,nm ,value) (set! variable-list (cons ',nm variable-list)))) The code can be found in context here (commented out in lines 94 - 96): http://code.google.com/p/aisleriot-web-client/source/browse/trunk/src/main/resources/scheme/sol.scm This is a description I have found about jscheme macros: "This syntax is defined so that (define name (macro (args) body)) is just like Common Lisp's (defmacro name (args) body). I realize I should add a mode where this syntax is not used." Could anyone please help me getting this macro correct in jscheme? You can see my attempt in lines 100-102, but it doesn't seem to work correctly. - Andreas |