File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5262,7 +5262,11 @@ reduces them without incurring seq initialization"
52625262 (reduce conj to from)))
52635263 ([to xform from]
52645264 (if (implements? IEditableCollection to)
5265- (-with-meta (persistent! (transduce xform conj! (transient to) from)) (meta to))
5265+ (let [tm (meta to)
5266+ rf (fn
5267+ ([coll] (-> (persistent! coll) (-with-meta tm)))
5268+ ([coll v] (conj! coll v)))]
5269+ (transduce xform rf (transient to) from))
52665270 (transduce xform conj to from))))
52675271
52685272(defn mapv
Original file line number Diff line number Diff line change 387387 (testing " CLJS-2258"
388388 (is (= [" 1" ] (sequence (map str) (eduction [1 ]))))))
389389
390+ (deftest test-into+halt-when
391+ (is (= :anomaly (into [] (comp (filter some?) (halt-when #{:anomaly }))
392+ [1 2 3 :anomaly 4 ])))
393+ (is (= {:anomaly :oh-no! ,
394+ :partial-results [1 2 ]}
395+ (into []
396+ (halt-when :anomaly #(assoc %2 :partial-results %1 ))
397+ [1 2 {:anomaly :oh-no! } 3 4 ]))))
398+
390399(deftest test-obj-equiv
391400 (testing " Object equiv method"
392401 (is (.equiv :foo :foo ))
12821291 [5 4 ]))
12831292 (is (= (transduce (halt-when #{1 } (fn [ret input] (conj ret input))) conj [] [5 4 1 2 3 ])
12841293 [5 4 1 ]))
1285- (is (= (into [] (halt-when #{1 } (fn [ret in] (conj! ret in))) [2 3 1 ])
1294+ (is (= (into [] (halt-when #{1 } (fn [ret in] (conj ret in))) [2 3 1 ])
12861295 [2 3 1 ]))))
12871296
12881297(deftest test-cljs-1839
You can’t perform that action at this time.
0 commit comments