vector-copy -- r7rs Definition accessor;
vector-copy (from vonuvoli);Procedure variants:
((vector) -> (vector))
((vector range-start) -> (vector))
vector;range-start;vector;((vector range-start range-end) -> (vector))
vector;range-start;range-end;vector;scheme:base -- (scheme base);scheme -- (scheme);(vector-copy vector) (vector-copy vector start) (vector-copy vector start end)Returns a newly allocated copy of the elements of the given
vectorbetweenstartandend. The elements of the new vector are the same (in the sense ofeqv?) as the elements of the old.(define a #(1 8 2 8)) ; a may be immutable (define b (vector-copy a)) (vector-set! b 0 3) ; b is mutable b ===> #(3 8 2 8) (define c (vector-copy b 1 3)) c ===> #(8 2)
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.