working clojure pseudo code