Problem 8 in clojure.