Exercise 1.28 in Clojure