Skip to content

Commit 138bc63

Browse files
committed
fix equiv-map typo, make public, clarify docstring
1 parent 76c1a63 commit 138bc63

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/main/cljs/cljs/core.cljs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5828,24 +5828,24 @@ reduces them without incurring seq initialization"
58285828

58295829
(def ^:private never-equiv (NeverEquiv.))
58305830

5831-
(defn- ^boolean equiv-map
5832-
"Assumes y is a map. Returns true if x equals y, otherwise returns
5833-
false."
5831+
(defn ^boolean equiv-map
5832+
"Test map equivalence. Returns true if x equals y, otherwise returns false."
58345833
[x y]
58355834
(boolean
58365835
(when (and (map? y) (not (record? y)))
58375836
; assume all maps are counted
58385837
(when (== (count x) (count y))
58395838
(if (satisfies? IKVReduce x)
5840-
(reduce-kv (fn [_ k v]
5841-
(if (= (get y k never-equiv) v)
5842-
true
5843-
(reduced false)))
5844-
true
5845-
x)
5846-
(every? (fn [xkv] (= (get y (first xkv) never-equiv)
5847-
(second v)))
5848-
x))))))
5839+
(reduce-kv
5840+
(fn [_ k v]
5841+
(if (= (get y k never-equiv) v)
5842+
true
5843+
(reduced false)))
5844+
true x)
5845+
(every?
5846+
(fn [xkv]
5847+
(= (get y (first xkv) never-equiv) (second xkv)))
5848+
x))))))
58495849

58505850

58515851
(defn- scan-array [incr k array]

0 commit comments

Comments
 (0)