diff --git a/src/tiara/data.clj b/src/tiara/data.clj index 88e78d7..f8b911c 100644 --- a/src/tiara/data.clj +++ b/src/tiara/data.clj @@ -85,6 +85,8 @@ (putAll [m] (throw (UnsupportedOperationException.))) (remove [k] (throw (UnsupportedOperationException.)))))) +(def EMPTY_MAP (vec-map)) + (defn vreverse "Reverses a vector into a vector. Lists are reversed as usual." [v] @@ -94,7 +96,7 @@ (defn ordered-map "Returns a map object that remembers the insertion order, similarly to a java.util.LinkedHashMap" - ([] (vec-map)) + ([] EMPTY_MAP) ([& keyvals] (let [kv-vec (vreverse (second @@ -106,5 +108,3 @@ kv-vec (apply hash-map (interleave (map first kv-vec) (range))))))) -(def EMPTY_MAP (vec-map)) -