How to find the fully qualified namespace of a symbol?
clojure, namespaces
Solution
You can get the namespace object of a symbol as shown below (if you want name of ns as string then just call str at the end):
(defn fqns [s] (->> (resolve s) meta :ns))
Problem
If I have a symbol who's namespace is an alias, like q/w, how can I find its actual namespace, say actual.namespace/w ? I know that `resolve` will give me the fully qualified var, but I don't know how to get the namespace of a var. The best I can do is: ``` (defn fqns [s] (str (get (ns-aliases *ns*) (symbol (namespace s))))) ``` surely there's a simpler way ?