On 9/3/13 10:01 AM, Mark wrote:
I find the vast majority of the time I'm tempted to write a macro (yeah, yeah, I know the first rule of macro club), is to defn-like things. Writing a defn-like macro to handle all the stuff defn does is pretty tough so I end up writing a barebones thing that doesn't support doc-string, doesn't support multiple arities, and doesn't support metadata. I'm wondering, has anyone written a defdefnmacro macro?


Clojure's tools.macros has a helper function for such macros called name-with-attributes:

https://github.com/clojure/tools.macro/blob/master/src/main/clojure/clojure/tools/macro.clj#L275-L298

HTH,
Ben

--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to