Skip to content

Instantly share code, notes, and snippets.

@francoisdevlin
Created February 18, 2010 15:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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