function | since v1.7.10 | clojure.core/find-ns | Edit |
(find-ns ns)
Returns the namespace named by the symbol or nil if it doesn't exist. Bootstrap only.
(defn find-ns
[ns]
(when (nil? NS_CACHE)
(set! NS_CACHE (atom {})))
(let [the-ns (get @NS_CACHE ns)]
(if-not (nil? the-ns)
the-ns
(let [ns-obj (find-ns-obj ns)]
(when-not (nil? ns-obj)
(let [new-ns (create-ns ns ns-obj)]
(swap! NS_CACHE assoc ns new-ns)
new-ns))))))