a clojure port of dmap