initial translation of example 6 to clojure