Last active
July 16, 2020 07:24
-
-
Save microamp/a454d3a2d906cdd73bc9e1a5726ed353 to your computer and use it in GitHub Desktop.
The simplest possible macro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-syntax unless | |
(syntax-rules () | |
[(unless e1 e2 e3) | |
(if (not e1) e2 e3)] | |
[(unless e1 e2) | |
(if (not e1) e2 #f)])) | |
(unless #t (/ 1 0) (+ 1 2 3 4)) ;; 10 | |
(unless #t (/ 1 0)) ;; #f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment