Clojure's maps: are keys and vals in same order?
clojure, hashmap
Solution
I can confirm (officially) that the answer to this is yes. The docstrings for `keys` and `vals` were updated in Clojure 1.6 to mention this (see http://dev.clojure.org/jira/browse/CLJ-1302).
Problem
Is it ok to rely on `(= m (zipmap (keys m) (vals m)))` in Clojure 1.3+? Having this behavior makes for slightly more readable code in some situations, eg ``` (defn replace-keys [smap m] (zipmap (replace smap (keys m)) (vals m))) ``` vs. ``` (defn replace-keys [smap m] (into {} (for [[k v] m] [(smap k k) v])) ```