File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -3986,6 +3986,11 @@ reduces them without incurring seq initialization"
39863986
39873987(set! *unchecked-if* false )
39883988
3989+ ; ; CLJS-3200: used by destructure macro for maps to reduce amount of repeated code
3990+ ; ; placed here because it needs apply and hash-map (only declared at this point)
3991+ (defn --destructure-map [x]
3992+ (if (implements? ISeq x) (apply cljs.core/hash-map x) x))
3993+
39893994(defn vary-meta
39903995 " Returns an object of the same type and value as obj, with
39913996 (apply f (meta obj) args) as its metadata."
Original file line number Diff line number Diff line change 666666 (core/let [gmap (gensym " map__" )
667667 defaults (:or b)]
668668 (core/loop [ret (core/-> bvec (conj gmap) (conj v)
669- (conj gmap) (conj `(if ( implements? ISeq ~gmap) ( apply cljs.core/hash- map ~gmap) ~gmap))
669+ (conj gmap) (conj `(--destructure- map ~gmap))
670670 ((core/fn [ret]
671671 (if (:as b)
672672 (conj ret (:as b) gmap)
You can’t perform that action at this time.
0 commit comments