Created
May 11, 2015 18:01
-
-
Save code-shoily/b2a57d1bd20802cb70be 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 cl-cond | |
[& others] | |
(if others | |
(let [more# (next others) | |
extra-clauses# (if more# `(cl-cond ~@more#)) | |
clause# (first others)] | |
(if (= 2 (count clause#)) | |
`(if ~(first clause#) ~(second clause#) ~extra-clauses#) | |
`(if ~(first clause#) ~(first clause#) ~extra-clauses#))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment