The following is perfectly valid Clojure code:
(def a (atom nil))
(def b (atom a))
(reset! a b)
it is even useful in situations where back references are needed.
However, it is annoying to work with such things in the REPL: the REPL will try to print the content of such references whenever you type a or b, and will, of course, generate a stack overflow error pretty quickly.
So is there any way to control/change the printing behaviour of atoms/refs/agents in Clojure? Some kind of cycle detection would be nice, but even the complete suppression of the deref'ed content would be really useful.