Problem 9 in clojure.