Macro debugging

(expand {expression} ) special form
A custom special form expand can be used to see the result of a macro expansion of a given expression, for debugging purposes.

For example, we can see that the let* expression:

(expand (let* ((x 42) (y x)) y))

is transformed into:

((lambda (x390) ((lambda (y394) ((lambda () y394))) x390)) 42)

Note that any variables in the expanded code are renamed by husk's macro hygiene algorithm.

husk-scheme online documentation rev 3.2 (2021.03.04)