Skip to content

Instantly share code, notes, and snippets.

@fogus
Created September 7, 2010 15:19
Show Gist options
  • Save fogus/568518 to your computer and use it in GitHub Desktop.
Save fogus/568518 to your computer and use it in GitHub Desktop.
(defmacro gen-em [body]
`(do
~@(for [[fn-name# fn-doc#] body]
(list 'defn fn-name# fn-doc# ['a] 'a))))
(gen-em [[foo "sample doc"] [bar "detailed documentation"]])
(foo :foo)
;=> :foo
(bar :bar)
;=> bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment