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"
1227412274
1227512275; ;; Vector
1227612276
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+
1227712286(deftype Vector [meta array ^:mutable __hash]
1227812287 Object
1227912288 (toString [coll]
@@ -12438,6 +12447,10 @@ reduces them without incurring seq initialization"
1243812447 (-persistent! [coll]
1243912448 coll)
1244012449
12450+ IIterable
12451+ (-iterator [coll]
12452+ (VectorIterator. array 0 ))
12453+
1244112454 IPrintWithWriter
1244212455 (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer " [" " " " ]" opts coll)))
1244312456
You can’t perform that action at this time.
0 commit comments