> There's one question that came up when I implemented this. Is there a
> way to get the name of a clojure function, when all I have is the
> function object? Is it stored alongside the function? I didn't see any
> metadata or anything. Would I really have to reverse lookup the name
> in some namespace maps?

Functions don't have to have names:

(fn [] (println "I'm anonymous!"))

If you have a symbol you can get the name, though:

(name '<) => "<"

or

(str '<) => "<"

The former will print only the name. The latter will print the
namespace, too, if the symbol has one.

Does that help?

-- 
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

Reply via email to