123456789101112131415161718 |
- ;; FROM: https://www.gnu.org/software/guile/manual/html_node/Defining-Macros.html#Defining-Macros
- ;; global syntax definition
- (define-syntax when
- (syntax-rules ()
- ((when condition exp ...)
- (if condition
- (begin exp ...)))))
- ;; local syntax definition
- (let-syntax ([unless (syntax-rules ()
- ((unless condition exp ...)
- (if (not condition)
- (begin exp ...))))])
- (unless #t
- (primitive-exit 1))
- "rock rock rock")
|