File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -5035,6 +5035,9 @@ reduces them without incurring seq initialization"
5035
5035
(declare tv-editable-root tv-editable-tail TransientVector deref
5036
5036
pr-sequential-writer pr-writer chunked-seq )
5037
5037
5038
+ (defprotocol APersistentVector
5039
+ " Marker protocol" )
5040
+
5038
5041
(deftype PersistentVector [meta cnt shift root tail ^:mutable __hash]
5039
5042
Object
5040
5043
(toString [coll]
@@ -5164,6 +5167,7 @@ reduces them without incurring seq initialization"
5164
5167
(-find [coll k]
5165
5168
[k (get coll k)])
5166
5169
5170
+ APersistentVector
5167
5171
IVector
5168
5172
(-assoc-n [coll n val]
5169
5173
(cond
@@ -5485,7 +5489,9 @@ reduces them without incurring seq initialization"
5485
5489
5486
5490
IIterable
5487
5491
(-iterator [coll]
5488
- (ranged-iterator v start end)))
5492
+ (if (implements? APersistentVector coll)
5493
+ (ranged-iterator v start end)
5494
+ (seq-iter coll))))
5489
5495
5490
5496
(es6-iterable Subvec)
5491
5497
You can’t perform that action at this time.
0 commit comments