12.6 Local Binding with Splicing Body
(require racket/splicing) | package: base |
syntax
syntax
syntax
syntax
syntax
syntax
syntax
syntax
syntax
syntax
Examples: | ||||||||||
|
When a splicing binding form occurs in a top-level context or module context, its local bindings are treated similarly to definitions. In particular, if a reference to one of the splicing form’s bound variables is evaluated before the variable is initialized, an unbound variable error is raised, instead of the variable evaluating to the undefined value. Also, syntax bindings are evaluated every time the module is visited, instead of only once during compilation as in let-syntax, etc.
Example: | ||||||
|
Note that require transformers and provide transformers are not affected by syntax parameterization. While all uses of require and provide will be spliced into the enclosing context, derived import or export specifications will expand as if they had not been inside of the splicing-syntax-parameterize.
Examples: | |||||||||||||||
|