Created
June 17, 2011 12:46
-
-
Save mwmitchell/1031351 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
(def servers {}) | |
(def default-core :production) | |
(defmacro with-server | |
"Execute body with the *server* binding set" | |
([body] (with-server default-core body)) | |
([server-name & body] | |
`(binding [*server* (~server-name *servers*)] | |
~@body))) | |
;; results in: java.lang.IllegalArgumentException: Wrong number of args (2) passed to: solr$with-server (NO_SOURCE_FILE:0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment