Reimplment map function for clojure.