1.6 Defining Simple Macros
(require syntax/parse/define) | package: base |
syntax
(define-simple-macro (macro-id . pattern) pattern-directive ... template)
Defines a macro named macro-id; equivalent to the following:
(define-syntax (macro-id stx) (syntax-parse stx [(macro-id . pattern) pattern-directive ... #'template]))
Examples: | |||||||||||||||
|