Vars, Bindings, and Namespaces
When you define an object with def or defn, that object is stored in a Clojure var. For example, the following def creates a var named user/foo:
The symbol user/foo refers to a var that is bound to the value 10. If you ask Clojure to evaluate the symbol foo, it will return the value of the associated var:
The initial value of a var is called its root binding. Sometimes it is useful to have thread-local bindings for a var; this is covered in Managing Per-Thread State with Vars.
You can refer to a var directly. The var special form returns a var itself, not the var’s value:
You can use var to return the var bound to user/foo: