translation of example4 into clojure