Skip to content

Commit 20a32cb

Browse files
committed
- fix -count on sets
1 parent a3832e4 commit 20a32cb

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12769,10 +12769,16 @@ reduces them without incurring seq initialization"
1276912769
(-hash [coll] (caching-hash coll hash-unordered-coll __hash))
1277012770

1277112771
ISeqable
12772-
(-seq [coll] (keys hash-map))
12772+
(-seq [coll]
12773+
(let [xs (-seq hash-map)]
12774+
(when (some? xs)
12775+
(prim-seq (.map (.-arr xs) (fn [kv] (-key kv)))))))
1277312776

1277412777
ICounted
12775-
(-count [coll] (-count (-seq coll)))
12778+
(-count [coll]
12779+
(let [xs (-seq coll)]
12780+
(when (some? xs)
12781+
(-count xs))))
1277612782

1277712783
ILookup
1277812784
(-lookup [coll v]

0 commit comments

Comments
 (0)