File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -12274,6 +12274,15 @@ reduces them without incurring seq initialization"
12274
12274
12275
12275
; ;; Vector
12276
12276
12277
+ (deftype VectorIterator [arr ^:mutable i]
12278
+ Object
12279
+ (hasNext [_]
12280
+ (< i (alength arr)))
12281
+ (next [_]
12282
+ (let [x (aget arr i)]
12283
+ (set! i (inc i))
12284
+ x)))
12285
+
12277
12286
(deftype Vector [meta array ^:mutable __hash]
12278
12287
Object
12279
12288
(toString [coll]
@@ -12438,6 +12447,10 @@ reduces them without incurring seq initialization"
12438
12447
(-persistent! [coll]
12439
12448
coll)
12440
12449
12450
+ IIterable
12451
+ (-iterator [coll]
12452
+ (VectorIterator. array 0 ))
12453
+
12441
12454
IPrintWithWriter
12442
12455
(-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer " [" " " " ]" opts coll)))
12443
12456
You can’t perform that action at this time.
0 commit comments