Created
December 14, 2010 17:21
-
-
Save MayDaniel/740734 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 check-let [bindings & body] | |
| (assert (vector? bindings)) | |
| (assert (even? (count bindings))) | |
| (if (not-empty bindings) | |
| (let [[binding [else & more]] (split-at 2 bindings)] | |
| `(if-let [~@binding] (check-let [~@more] ~@body) ~else)) | |
| `(do ~@body))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment