user=> (def q (agent ""))
#'user/q
user=> (set-error-handler! q (fn [& _] (println "restart") (restart-agent q "")))
nil
user=> (send q inc)
restart
#<Agent@3d921eac FAILED: "">
user=> (send q str)
ClassCastException java.lang.String cannot be cast to java.lang.Number clojure.lang.Numbers.inc (Numbers.java:110)
user=> (restart-agent q "")
""
user=> (send q str)
#<Agent@3d921eac: "">
user=>
Почему так?