Returns the var or Class to which a symbol will be resolved in the
namespace (unless found in the environement), else nil. Note that
if the symbol is fully qualified, the var/Class to which it resolves
need not be present in the namespace.
(defn ns-resolve
"Returns the var or Class to which a symbol will be resolved in the
namespace (unless found in the environement), else nil. Note that
if the symbol is fully qualified, the var/Class to which it resolves
need not be present in the namespace."
{:added "1.0"
:static true}
([ns sym]
(ns-resolve ns nil sym))
([ns env sym]
(when-not (contains? env sym)
(clojure.lang.Compiler/maybeResolveIn (the-ns ns) sym))))
Comments top
1 comment(s) for ns-resolve.
The appropriate value for the
envarg is what you get from the implicit&envarg available to a macro.envarg is what you get from the implicit&envarg available to a macro.