chibi-scheme/lib/scheme/misc-macros.scm

10 lines
198 B
Scheme

(define-syntax when
(syntax-rules ()
((when test . body)
(if test (begin . body)))))
(define-syntax unless
(syntax-rules ()
((unless test . body)
(when (not test) . body))))