File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -12552,9 +12552,20 @@ reduces them without incurring seq initialization"
12552
12552
ISeqable
12553
12553
(-seq [coll]
12554
12554
(when (pos? count)
12555
- (let [hashes (.sort (js-keys hashobj))]
12556
- (mapcat #(map (fn [[k v]] (MapEntry. k v nil )) (partition 2 (unchecked-get hashobj %)))
12557
- hashes))))
12555
+ (let [hashes (.sort (js-keys hashobj))
12556
+ cnt (alength hashes)
12557
+ arr (array )]
12558
+ (loop [i 0 ]
12559
+ (if (< i cnt)
12560
+ (let [bckt (unchecked-get hashobj (aget hashes i))
12561
+ len (alength bkt)]
12562
+ (loop [j 0 ]
12563
+ (when (< j len)
12564
+ (do
12565
+ (.push arr (MapEntry. (aget bkt j) (aget bkt (inc j)) nil ))
12566
+ (recur (+ j 2 )))))
12567
+ (recur (inc i)))
12568
+ (prim-seq arr))))))
12558
12569
12559
12570
ICounted
12560
12571
(-count [coll] count)
You can’t perform that action at this time.
0 commit comments