@@ -12487,7 +12487,10 @@ reduces them without incurring seq initialization"
12487
12487
(-invoke [coll k]
12488
12488
(-lookup coll k))
12489
12489
(-invoke [coll k not-found]
12490
- (-lookup coll k not-found)))
12490
+ (-lookup coll k not-found))
12491
+
12492
+ IPrintWithWriter
12493
+ (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer " [" " " " ]" opts coll)))
12491
12494
12492
12495
(set! (. Vector -EMPTY) (Vector. nil (array )))
12493
12496
@@ -12583,12 +12586,29 @@ reduces them without incurring seq initialization"
12583
12586
(-invoke [coll k]
12584
12587
(-lookup coll k))
12585
12588
(-invoke [coll k not-found]
12586
- (-lookup coll k not-found)))
12589
+ (-lookup coll k not-found))
12590
+
12591
+ IPrintWithWriter
12592
+ (-pr-writer [coll writer opts]
12593
+ (print-map coll pr-writer writer opts)))
12587
12594
12588
12595
(set! (. ObjMap -EMPTY) (ObjMap. nil (array ) (js-obj )))
12589
12596
12590
12597
(set! (. ObjMap -fromObject) (fn [ks obj] (ObjMap. nil ks obj)))
12591
12598
12599
+ (defn obj-map
12600
+ " keyval => key val
12601
+ Returns a new object map with supplied mappings."
12602
+ [& keyvals]
12603
+ (let [ks (array )
12604
+ obj (js-obj )]
12605
+ (loop [kvs (seq keyvals)]
12606
+ (if kvs
12607
+ (do (.push ks (first kvs))
12608
+ (gobject/set obj (first kvs) (second kvs))
12609
+ (recur (nnext kvs)))
12610
+ (.fromObject ObjMap ks obj)))))
12611
+
12592
12612
; The keys field is an array of all keys of this map, in no particular
12593
12613
; order. Each key is hashed and the result used as a property name of
12594
12614
; hashobj. Each values in hashobj is actually a bucket in order to handle hash
@@ -12681,7 +12701,11 @@ reduces them without incurring seq initialization"
12681
12701
(-invoke [coll k]
12682
12702
(-lookup coll k))
12683
12703
(-invoke [coll k not-found]
12684
- (-lookup coll k not-found)))
12704
+ (-lookup coll k not-found))
12705
+
12706
+ IPrintWithWriter
12707
+ (-pr-writer [coll writer opts]
12708
+ (print-map coll pr-writer writer opts)))
12685
12709
12686
12710
(set! (. HashMap -EMPTY) (HashMap. nil 0 (js-obj )))
12687
12711
@@ -12739,6 +12763,9 @@ reduces them without incurring seq initialization"
12739
12763
(-invoke [coll k]
12740
12764
(-lookup coll k))
12741
12765
(-invoke [coll k not-found]
12742
- (-lookup coll k not-found)))
12766
+ (-lookup coll k not-found))
12767
+
12768
+ IPrintWithWriter
12769
+ (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer " #{" " " " }" opts coll)))
12743
12770
12744
12771
(set! (. Set -EMPTY) (Set. nil (hash-map )))
0 commit comments