File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -8430,11 +8430,10 @@ reduces them without incurring seq initialization"
84308430
84318431 ISeqable
84328432 (-seq [rng]
8433- (if (pos? step)
8434- (when (< start end)
8435- rng)
8436- (when (> start end)
8437- rng)))
8433+ (cond
8434+ (pos? step) (when (< start end) rng)
8435+ (neg? step) (when (> start end) rng)
8436+ :else (when-not (== start end) rng)))
84388437
84398438 ISeq
84408439 (-first [rng]
Original file line number Diff line number Diff line change 12211221 (is (= (range 0 -3 -1 ) (list 0 -1 -2 )))
12221222 (is (= (range 3 0 -1 ) (list 3 2 1 )))
12231223 (is (= (range 0 10 -1 ) (list )))
1224- (is (= (range 0 1 0 ) (list )))
1224+ (is (= (take 3 ( range 0 1 0 )) (list 0 0 0 )))
12251225 (is (= (range 10 0 1 ) (list )))
12261226 (is (= (range 0 0 0 ) (list )))
12271227 (is (= (count (range 0 10 -1 )) 0 ))
1228- (is (= (count (range 0 1 0 )) 0 ))
1228+ (is (= (count (take 3 ( range 0 2 0 ))) 3 ))
12291229 (is (= (count (range 10 0 1 )) 0 ))
12301230 (is (= (count (range 0 0 0 )) 0 ))
12311231 (is (= (take 3 (range 1 0 0 )) (list 1 1 1 )))
You can’t perform that action at this time.
0 commit comments