An attempt at this in Clojure