File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -5829,6 +5829,13 @@ reduces them without incurring seq initialization"
5829
5829
(-empty coll)
5830
5830
(PersistentQueueSeq. meta rear nil nil ))))
5831
5831
5832
+ INext
5833
+ (-next [coll]
5834
+ (if-let [f1 (next front)]
5835
+ (PersistentQueueSeq. meta f1 rear nil )
5836
+ (when (some? rear)
5837
+ (PersistentQueueSeq. meta rear nil nil ))))
5838
+
5832
5839
ICollection
5833
5840
(-conj [coll o] (cons o coll))
5834
5841
@@ -7301,6 +7308,12 @@ reduces them without incurring seq initialization"
7301
7308
(create-inode-seq nodes i (next s)))]
7302
7309
(if-not (nil? ret) ret ())))
7303
7310
7311
+ INext
7312
+ (-next [coll]
7313
+ (if (nil? s)
7314
+ (create-inode-seq nodes (+ i 2 ) nil )
7315
+ (create-inode-seq nodes i (next s))))
7316
+
7304
7317
ISeqable
7305
7318
(-seq [this] this)
7306
7319
@@ -7367,6 +7380,10 @@ reduces them without incurring seq initialization"
7367
7380
(let [ret (create-array-node-seq nil nodes i (next s))]
7368
7381
(if-not (nil? ret) ret ())))
7369
7382
7383
+ INext
7384
+ (-next [coll]
7385
+ (create-array-node-seq nil nodes i (next s)))
7386
+
7370
7387
ISeqable
7371
7388
(-seq [this] this)
7372
7389
@@ -7724,6 +7741,14 @@ reduces them without incurring seq initialization"
7724
7741
(if-not (nil? next-stack)
7725
7742
(PersistentTreeMapSeq. nil next-stack ascending? (dec cnt) nil )
7726
7743
())))
7744
+ INext
7745
+ (-next [this]
7746
+ (let [t (first stack)
7747
+ next-stack (tree-map-seq-push (if ascending? (.-right t) (.-left t))
7748
+ (next stack)
7749
+ ascending?)]
7750
+ (when-not (nil? next-stack)
7751
+ (PersistentTreeMapSeq. nil next-stack ascending? (dec cnt) nil ))))
7727
7752
7728
7753
ICounted
7729
7754
(-count [coll]
Original file line number Diff line number Diff line change 678
678
(is (= (find map nil ) [nil :foo ])))))
679
679
680
680
(deftype CustomVectorThing [v]
681
+ ; ; Subvec expects its argument to implement IVector.
682
+ ; ; Note, that this method is never actually called.
681
683
IVector
682
- (-assoc-n [coll i val] ( assoc-n v i val) )
684
+ (-assoc-n [coll i val] nil )
683
685
684
686
IIndexed
685
687
(-nth [coll i] (nth v i))
You can’t perform that action at this time.
0 commit comments