@@ -12313,7 +12313,10 @@ reduces them without incurring seq initialization"
12313
12313
(-invoke [coll k]
12314
12314
(-lookup coll k))
12315
12315
(-invoke [coll k not-found]
12316
- (-lookup coll k not-found)))
12316
+ (-lookup coll k not-found))
12317
+
12318
+ IPrintWithWriter
12319
+ (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer " [" " " " ]" opts coll)))
12317
12320
12318
12321
(set! (. Vector -EMPTY) (Vector. nil (array )))
12319
12322
@@ -12409,12 +12412,29 @@ reduces them without incurring seq initialization"
12409
12412
(-invoke [coll k]
12410
12413
(-lookup coll k))
12411
12414
(-invoke [coll k not-found]
12412
- (-lookup coll k not-found)))
12415
+ (-lookup coll k not-found))
12416
+
12417
+ IPrintWithWriter
12418
+ (-pr-writer [coll writer opts]
12419
+ (print-map coll pr-writer writer opts)))
12413
12420
12414
12421
(set! (. ObjMap -EMPTY) (ObjMap. nil (array ) (js-obj )))
12415
12422
12416
12423
(set! (. ObjMap -fromObject) (fn [ks obj] (ObjMap. nil ks obj)))
12417
12424
12425
+ (defn obj-map
12426
+ " keyval => key val
12427
+ Returns a new object map with supplied mappings."
12428
+ [& keyvals]
12429
+ (let [ks (array )
12430
+ obj (js-obj )]
12431
+ (loop [kvs (seq keyvals)]
12432
+ (if kvs
12433
+ (do (.push ks (first kvs))
12434
+ (gobject/set obj (first kvs) (second kvs))
12435
+ (recur (nnext kvs)))
12436
+ (.fromObject ObjMap ks obj)))))
12437
+
12418
12438
; The keys field is an array of all keys of this map, in no particular
12419
12439
; order. Each key is hashed and the result used as a property name of
12420
12440
; hashobj. Each values in hashobj is actually a bucket in order to handle hash
@@ -12507,7 +12527,11 @@ reduces them without incurring seq initialization"
12507
12527
(-invoke [coll k]
12508
12528
(-lookup coll k))
12509
12529
(-invoke [coll k not-found]
12510
- (-lookup coll k not-found)))
12530
+ (-lookup coll k not-found))
12531
+
12532
+ IPrintWithWriter
12533
+ (-pr-writer [coll writer opts]
12534
+ (print-map coll pr-writer writer opts)))
12511
12535
12512
12536
(set! (. HashMap -EMPTY) (HashMap. nil 0 (js-obj )))
12513
12537
@@ -12565,6 +12589,9 @@ reduces them without incurring seq initialization"
12565
12589
(-invoke [coll k]
12566
12590
(-lookup coll k))
12567
12591
(-invoke [coll k not-found]
12568
- (-lookup coll k not-found)))
12592
+ (-lookup coll k not-found))
12593
+
12594
+ IPrintWithWriter
12595
+ (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer " #{" " " " }" opts coll)))
12569
12596
12570
12597
(set! (. Set -EMPTY) (Set. nil (hash-map )))
0 commit comments