Rewrite of an old Java programming assignment in Clojure.