File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -6999,9 +6999,10 @@ reduces them without incurring seq initialization"
6999
6999
(first s)))
7000
7000
7001
7001
(-rest [coll]
7002
- (if (nil? s)
7003
- (create-inode-seq nodes (+ i 2 ) nil )
7004
- (create-inode-seq nodes i (next s))))
7002
+ (let [ret (if (nil? s)
7003
+ (create-inode-seq nodes (+ i 2 ) nil )
7004
+ (create-inode-seq nodes i (next s)))]
7005
+ (if-not (nil? ret) ret ())))
7005
7006
7006
7007
ISeqable
7007
7008
(-seq [this] this)
@@ -7032,8 +7033,7 @@ reduces them without incurring seq initialization"
7032
7033
(if-let [node-seq (.inode-seq node)]
7033
7034
(NodeSeq. nil nodes (+ j 2 ) node-seq nil )
7034
7035
(recur (+ j 2 )))
7035
- (recur (+ j 2 ))))
7036
- ())))
7036
+ (recur (+ j 2 )))))))
7037
7037
(NodeSeq. nil nodes i s nil ))))
7038
7038
7039
7039
(deftype ArrayNodeSeq [meta nodes i s ^:mutable __hash]
@@ -7066,7 +7066,9 @@ reduces them without incurring seq initialization"
7066
7066
ISequential
7067
7067
ISeq
7068
7068
(-first [coll] (first s))
7069
- (-rest [coll] (create-array-node-seq nil nodes i (next s)))
7069
+ (-rest [coll]
7070
+ (let [ret (create-array-node-seq nil nodes i (next s))]
7071
+ (if-not (nil? ret) ret ())))
7070
7072
7071
7073
ISeqable
7072
7074
(-seq [this] this)
Original file line number Diff line number Diff line change 3230
3230
rest rest rest rest rest rest rest rest rest)
3231
3231
())))
3232
3232
3233
+ (deftest test-cljs-1744
3234
+ (doseq [i (range 1 64 )]
3235
+ (let [m (zipmap (range i) (range i))]
3236
+ (is (= () (last (take (inc i) (iterate rest m))))))))
3237
+
3233
3238
(comment
3234
3239
; ; ObjMap
3235
3240
; ; (let [ks (map (partial str "foo") (range 500))
You can’t perform that action at this time.
0 commit comments