Skip to content

Instantly share code, notes, and snippets.

@francoisdevlin
Created February 18, 2010 15:29
Show Gist options
  • Save francoisdevlin/307738 to your computer and use it in GitHub Desktop.
Save francoisdevlin/307738 to your computer and use it in GitHub Desktop.
(defmacro extend-ns
[pred & ns-clauses]
(if (pred a-ns)
(let [clauses (apply hash-map ns-clauses)]
`(do
(import ~@(:import clauses))
(use ~@(:use clauses))
(require ~@(:require ))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment