ref-clojure optimization