Last active
August 29, 2015 14:05
-
-
Save lynxluna/fea48dba6a7a58a916ca to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(defmacro def-if | |
"Define a symbol when one condition is met" | |
([condition sym true-expr] | |
(if condition `(def sym ~true-expr))) | |
([condition sym true-expr false-expr] | |
(if condition `(def sym ~true-expr) `(def sym ~false-expr)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment