ClojureDocs

Nav

Namespaces

find-var

clojure.core

Available since 1.0 (source)
  • (find-var sym)
Returns the global var named by the namespace-qualified symbol, or
nil if no var with that name.
1 Example
user=> (find-var 'clojure.core/map)
#'clojure.core/map
user=> (find-var 'clojure.core/qwerty)
nil
user=> (find-var 'map)
IllegalArgumentException Symbol must be namespace-qualified  clojure.lang.Var.find (Var.java:150)
See Also
No see-alsos for clojure.core/find-var
1 Note
    By , created 7.1 years ago

    For namespaces other than those in Clojure, you must do (require 'the-ns) first, followed by (find-var 'the-ns/the-name). Failing to do this leads to IllegalArgumentException thrown complaining about no such namespace.