May 2018
Beginner to intermediate
290 pages
6h 43m
English
In the last chapter we saw how def creates vars—vars that represent the binding between a symbol and a value. What we skipped over in that chapter is how vars are organized. But really it’s very simple. As illustrated in the figure, vars live in namespaces.

Conceptually, a Clojure namespace is just a big lookup table of vars, indexed by their symbols. And since you can have as many namespaces in your program as you want, each namespace itself has a unique name. At any given moment there is one special namespace, called the current namespace. So if you do this:
| | (def discount-rate 0.15) |
it’s the current ...
Read now
Unlock full access