[plt-scheme] A question on "expand"

From: Chris Wright (caw at cs.mu.oz.au)
Date: Tue Nov 12 00:18:53 EST 2002

I'm currently in the middle of getting macros all wrong;)
So, I'm trying to "see what they look like" by using "expand"

  (define-macro t
     (lambda (args)
       `(apply + ,args)))

(useless --- I know)

 > (t ' (1 2))


but I want to see the expansion:

 > (expand (t '(1 2)))
  (expand-to-top-form (t '(1 2)))

Terrific :(

How do I "see" the expansion?



Dr Chris Wright
Medical Director, ICU
Monash Medical Centre
Clayton VIC 3168

Posted on the users mailing list.