letrec-syntax -- r7rs Definition syntax;
letrec-syntax (from vonuvoli);Syntax keywords:
keyword: identifier;syntaxes: pattern with variants:
();((keyword @syntax-transformer) |...|);expression: expression;Syntax variants:
(_ syntaxes)(_ syntaxes expression |...|)scheme:base -- (scheme base);scheme -- (scheme);(letrec-syntax <bindings> <body>)Syntax: Same as for
let-syntax.Semantics: The
<body>is expanded in the syntactic environment obtained by extending the syntactic environment of theletrec-syntaxexpression with macros whose keywords are the<keyword>s, bound to the specified transformers. Each binding of a<keyword>has the<transformer-spec>s as well as the<body>within its region, so the transformers can transcribe expressions into uses of the macros introduced by theletrec-syntaxexpression.(letrec-syntax ((my-or (syntax-rules () ((my-or) #f) ((my-or e) e) ((my-or e1 e2 ...) (let ((temp e1)) (if temp temp (my-or e2 ...))))))) (let ((x #f) (y 7) (temp 8) (let odd?) (if even?)) (my-or x (let temp) (if y) y))) ===> 7
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.