Exercise 1.34
Exercise 1.35 in Clojure