Implementation of the Damm algorithm in clojure