I'm trying tying to get "macroexpand" to do something useful, but I
seem to be failing, and...
http://www.call-with-current-continuation.org/manual/Macros.html#Macros
...doesn't answer my question. I'd like to see what my macros get
expanded to, but none of the following uses appears to do the
trick...
;define a very simple macro...
(define-macro (test n)
`(if (= 0 ,n) 'zero 'not))
;test it out...
(display (test 0)) ;(if (= 0 0) 'zero 'not)
(newline)
(display (test 1)) ;(if (= 0 1) 'zero 'not)
(newline)
;try and see what our macro looks like, but the following don't work...
(display (macroexpand '(test 2))) (newline)
(display (macroexpand (test 3))) (newline)
(display (macroexpand-1 '(test 4))) (newline)
(display (macroexpand-1 (test 5))) (newline)
(display (macroexpand 'test)) (newline)
(display (macroexpand test)) (newline)
Thanks,
Greg Buchholz
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users