Macros in Scheme
- Macros are defined in source codes.
- Usually in
(define-library)
forms.
- Macros in Scheme can be expanded at compile time.
- Stak's compiler does that.
(define-syntax or
(syntax-rules ()
((_)
#f)
((_ test)
test)
((_ test1 test2 ...)
(let ((x test1))
(if x x (or test2 ...))))))