File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9721,7 +9721,7 @@ reduces them without incurring seq initialization"
97219721 (let [fst (first s)
97229722 fv (f fst)
97239723 run (cons fst (take-while #(= fv (f %)) (next s)))]
9724- (cons run (partition-by f (seq (drop (count run) s)))))))))
9724+ (cons run (partition-by f (lazy- seq (drop (count run) s)))))))))
97259725
97269726(defn frequencies
97279727 " Returns a map from distinct items in coll to the number of times
Original file line number Diff line number Diff line change 216216(deftest test-cljs-2482
217217 (testing " seq on defrecord returns map entries"
218218 (is (every? map-entry? (seq (->Foo 1 2 ))))))
219+
220+ (deftest test-cljs-2911
221+ (testing " partition-by works correclty with infinite seqs"
222+ (is (= (first (second (partition-by zero? (range )))) 1 ))))
You can’t perform that action at this time.
0 commit comments