Created
December 25, 2012 02:50
-
-
Save redraiment/4371436 to your computer and use it in GitHub Desktop.
If test is true, evaluates then with binding-form bound to the value of test, if not, yields else.
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 if-let ((var test) then &optional else) | |
"(if-let binding then else?) | |
binding => binding-form test | |
If test is true, evaluates then with binding-form bound to the value of | |
test, if not, yields else" | |
`(let ((,var ,test)) | |
(if ,var | |
,then | |
,else))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment