Given a var, I need to find it’s name, kind of the opposite of resolve
. I wonder if anyone has a better solution for this, the best I’ve come up with so var is this:
(defn var-name [v]
(symbol (str (.-name (.-ns v))) (str (.-sym v))))
(var-name #'update)
;;=> clojure.core/update