Don't use a def for this, in fact the only sane reasons you can redef is to enable development at the repl or hot code reloading.

The above solution is idiomatic as clojure has a philosophy of maximal immutability and controlled mutability. An atom is the simplest form of controlled mutability provided by clojure. This solution is ready for use by multiple threads, and is appropriate for use by a single thread, without you having to think about it too much. That's the clojure way.