Completed ex1.9 in Clojure