add clojure version based on Peter Fraenkel's