How can you get function\'s name as string in Clojure?
What I have so far doesn\'t look anywhere near idiomatic:
(defn fn-name [f] (first (re-find #\
For functions defined with the defn form:
defn
user> (-> #'map meta :name) map user> (defn nothing [& _]) #'user/nothing user> (-> #'nothing meta :name) nothing
This requires access to the var, rather than just the function value the var holds.