Bohtvaroh

Clojure - defs macro

Dec 8th, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defmacro defs
  2.   "Creates multiple defs at once."
  3.   [& args]
  4.   `(do ~@(map (fn [[name value]] (list 'def name value)) (partition 2 args))))
Advertisement
Add Comment
Please, Sign In to add comment