in case you are not aware of it https://github.com/clojure/tools.trace may already do just what you want.
but if not, then how about this show fn takes a symbol as arg? that is how tools.trace/trace-vars does it. On Friday, May 2, 2014 3:28:49 AM UTC+1, Erlis Vidal wrote: > > Hi guys, > > I want to write a function (show) that will receive a function as > parameter. How can print the original name of that function? I've tried > with meta, resolve, name but none of them give me the result I want. > > The goal is that I want to write a function that print the name of the > function that will be executed then the result of that execution. If > there's a better way to achieve this I'll appreciate your suggestions. > > Thanks! > Erlis > > (defn show [f sol] > (print (meta f))) > > > (defn -main [] > (show elementary/nothing-but-the-truth true)) > > -- 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/d/optout.