Skip to content

Commit a2373cb

Browse files
committed
- use kv-reduce to save some more space
1 parent 6ce216c commit a2373cb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12440,7 +12440,12 @@ reduces them without incurring seq initialization"
1244012440
(.push new-keys k)
1244112441
(ObjMap. meta new-keys new-strobj nil)))
1244212442
; non-string key. game over.
12443-
(-with-meta (apply simple-hash-map k v (-seq coll)) meta)))
12443+
(-with-meta
12444+
(-kv-reduce coll
12445+
(fn [ret k v]
12446+
(-assoc ret k v))
12447+
(. HashMap -EMPTY) )
12448+
meta)))
1244412449
(-contains-key? [coll k]
1244512450
(if (and (string? k)
1244612451
(not (nil? (scan-array 1 k keys))))

0 commit comments

Comments
 (0)