File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 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"
58295829 (-empty coll)
58305830 (PersistentQueueSeq. meta rear nil nil ))))
58315831
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+
58325839 ICollection
58335840 (-conj [coll o] (cons o coll))
58345841
@@ -7301,6 +7308,12 @@ reduces them without incurring seq initialization"
73017308 (create-inode-seq nodes i (next s)))]
73027309 (if-not (nil? ret) ret ())))
73037310
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+
73047317 ISeqable
73057318 (-seq [this] this)
73067319
@@ -7367,6 +7380,10 @@ reduces them without incurring seq initialization"
73677380 (let [ret (create-array-node-seq nil nodes i (next s))]
73687381 (if-not (nil? ret) ret ())))
73697382
7383+ INext
7384+ (-next [coll]
7385+ (create-array-node-seq nil nodes i (next s)))
7386+
73707387 ISeqable
73717388 (-seq [this] this)
73727389
@@ -7724,6 +7741,14 @@ reduces them without incurring seq initialization"
77247741 (if-not (nil? next-stack)
77257742 (PersistentTreeMapSeq. nil next-stack ascending? (dec cnt) nil )
77267743 ())))
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 ))))
77277752
77287753 ICounted
77297754 (-count [coll]
Original file line number Diff line number Diff line change 678678 (is (= (find map nil ) [nil :foo ])))))
679679
680680(deftype CustomVectorThing [v]
681+ ; ; Subvec expects its argument to implement IVector.
682+ ; ; Note, that this method is never actually called.
681683 IVector
682- (-assoc-n [coll i val] ( assoc-n v i val) )
684+ (-assoc-n [coll i val] nil )
683685
684686 IIndexed
685687 (-nth [coll i] (nth v i))
You can’t perform that action at this time.
0 commit comments