translated example 8 into clojure