ns-resolve

added
1.0

ns
clojure.core

type
function

(ns-resolve ns sym) (ns-resolve ns env sym)

Returns the var or Class to which a symbol will be resolved in the
namespace (unless found in the environment), else nil.  Note that
if the symbol is fully qualified, the var/Class to which it resolves
need not be present in the namespace.

                user=> (defn f [n] (* n n n))
#'user/f
user=> ((ns-resolve *ns* (symbol "f")) 10)
1000
            
                ;; See also http://clojure.org/namespaces for information on namespaces in Clojure and how to inspect and manipulate them