/usr/lib/s9fes/help/macro-expand is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | S9fES (macro-expand object) ==> object
(macro-expand-1 object) ==> object
If OBJECT represents an expression that applies a macro, return the
expanded form of the macro application, else return OBJECT unaltered.
(define-syntax (while p . body)
`(let loop ()
(if ,p
(begin ,@body (loop)))))
(macro-expand-1 '(while (< x 10)
(display "hello!")
(newline)
(set! x (+ x 1))))
==> (let loop ()
(if (< x 10)
(begin (display "hello!")
(newline)
(set! x (+ x 1))
(loop))))
(macro-expand '(while (< x 10)
(display "hello!")
(newline)
(set! x (+ x 1))))
==> (((lambda (loop)
((lambda (g57)
(set! loop g57)
loop)
(lambda ()
(if (< x 10)
(begin (display "hi")
(newline)
(set! x (+ 1 x))
(loop))))))
#f))
|