Skip to content

Instantly share code, notes, and snippets.

@alepeino
Last active November 24, 2017 17:44
Show Gist options
  • Save alepeino/646dc5afd88c32c12398c1dda343958f to your computer and use it in GitHub Desktop.
Save alepeino/646dc5afd88c32c12398c1dda343958f to your computer and use it in GitHub Desktop.
clj macros
(defmacro compact [& args]
(assert (and (every? symbol? args)
(every? (comp var? resolve) args))
"Each of the arguments must be a defined symbol")
(zipmap (map keyword args) args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment