On Thu, Mar 8, 2012 at 1:47 PM, Jeff Weiss <[email protected]> wrote:
> A serializable.fn/defn would be really nice to have, I am not sure how
> difficult it would be to write, without having tried it.

In theory, not very difficult. Something like

(defmacro defn [name & everything-else]
  `(clojure.core/defn
     ~(with-meta name {:source `(defn ~name ~@everything-else)})
     ~@everything-else))

(which gets clojure.core/defn to do all of the heavy lifting) should
work if putting the metadata on the Var suffices.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to