Problem 6 in clojure.