In Clojure, how do I get the name of the namespace in which variables and functions are named? For example, improving the following:
(ns my-ns)
(def namespace-name "my-ns")
The problem with the above is that if I want to change the name of my-ns, I have to change the definition of namespace-name as well
A simple modification of Arthur’s answer works well.
However I want to warn Clojure beginners that
will not work for the purposes of this question, since *ns* is bound dynamically.