Find the qualified name of a var


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


Just gonna leave that typo there :slight_smile:


You could also construct it from (meta #'update) with the :ns and :name keys.