I use serializable.fn pretty extensively, and it's been working great for me. I think at this point, the only fix I put in that Phil didn't is that my serialized fn's print with an unqualified "fn" symbol, instead of "serializable.fn/fn". I did that so it's more readable, the tradeoff is that if you want your fn's to be re-serializable (which I don't think you do), you have to spell out which fn you're using.
https://github.com/weissjeffm/serializable-fn Another caveat is that it does not work with defn, just fn. So you would have to do (def qw (fn [] (inc 2)) 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. -jeff On Friday, March 2, 2012 10:19:56 PM UTC-5, Phil Hagelberg wrote: > > Mark Rathwell <mark.rathw...@gmail.com> writes: > > > (clojure.repl/source-fn 'qw) will give you the source. > > You can also use serializable-fn to create a function that will carry > its source around with it in metadata: > > https://github.com/technomancy/serializable-fn > > But it's not very well tested. > > -Phil > > -- 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