Very sorry. I should have searched before I wrote. http://groups.google.com/group/clojure/msg/fb9930ba2a25d2dd
On Feb 15, 11:00 am, Saul Hazledine <shaz...@gmail.com> wrote: > Hello, > Apologies if this there is an obvious documented answer to this > question. If I write a function: > > (defn example > "Get info about a function" > [f] > (println "Arity is" (arity f)) > (if (is-anonymous? f) > (println "Function is anonymous"))) > > I believe I can implement is-anonymous as: > > (defn is-anonymous? > "Indicates if the given function is anonymous" > [f] > (re-find #"\$eval\d+\$" (str f)) > > But I have no idea how to find an arity of a function. Is there a > better way of finding if a function is anonymous and is it possible to > find the arity? > > Thanks in advance for any help. > Saul -- 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