Last active
July 26, 2016 23:13
-
-
Save ertugrulcetin/ef439c50770918abf58e to your computer and use it in GitHub Desktop.
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
(defmacro if-let* | |
([bindings then] | |
`(if-let* ~bindings ~then nil)) | |
([bindings then else] | |
(if (seq bindings) | |
`(if-let [~(first bindings) ~(second bindings)] | |
(if-let* ~(drop 2 bindings) ~then ~else) | |
~(if-not (second bindings) else)) | |
then))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment