fix non-inlined `in-vector' sequence on proxied vectors
Merge to 5.0.2 Closes PR 11225
This commit is contained in:
parent
17c4cb9254
commit
ddca8cd29b
|
@ -420,7 +420,7 @@
|
|||
(define (:vector-gen v start stop step)
|
||||
(values
|
||||
;; pos->element
|
||||
(lambda (i) (unsafe-vector-ref v i))
|
||||
(lambda (i) (unsafe-vector*-ref v i))
|
||||
;; next-pos
|
||||
;; Minor optimisation. I assume add1 is faster than \x.x+1
|
||||
(if (= step 1) add1 (lambda (i) (+ i step)))
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
(test-generator [(a b c)] (in-mlist (mlist 'a 'b 'c)))
|
||||
(test-generator [(a b c)] #(a b c))
|
||||
(test-generator [(a b c)] (in-vector #(a b c)))
|
||||
(test-generator [(a b c)] (in-vector (chaperone-vector #(a b c) (lambda (vec i val) val) (lambda (vec i val) val))))
|
||||
(test-generator [(b c d)] (in-vector #(a b c d) 1))
|
||||
(test-generator [(b c d)] (in-vector #(a b c d e) 1 4))
|
||||
(test-generator [(b d f)] (in-vector #(a b c d e f g h) 1 7 2))
|
||||
|
|
Loading…
Reference in New Issue
Block a user