translated example 9 into clojure