1 ;;;"macrotst.scm" Test for R4RS Macros
2 ;;; From Revised^4 Report on the Algorithmic Language Scheme
3 ;;; Editors: William Clinger and Jonathon Rees
5 ; We intend this report to belong to the entire Scheme community, and so
6 ; we grant permission to copy it in whole or in part without fee. In
7 ; particular, we encourage implementors of Scheme to use this report as
8 ; a starting point for manuals and other documentation, modifying it as
11 ;;; To run this code type
13 ;;; (macro:load "macrotst.scm")
15 (write "this code should print now, outer, and 7") (newline)
18 (let-syntax ((when (syntax-rules ()
19 ((when test stmt1 stmt2 ...)
24 (when if (set! if 'now))
31 (let-syntax ((m (syntax-rules () ((m) x))))
43 (if temp temp (or e2 ...)))))))