vector-copy! -- r7rs Definition mutator!;
vector-copy! (from vonuvoli);Procedure variants:
(((source vector) (source-start range-start) (destination vector)) -> (undefined))
source of type vector;source-start of type range-start;destination of type vector;undefined;(((source vector) (source-start range-start) (destination vector) (destination-start range-start)) -> (undefined))
source of type vector;source-start of type range-start;destination of type vector;destination-start of type range-start;undefined;(((source vector) (source-start range-start) (destination vector) (destination-start range-start) (destination-end range-end)) -> (undefined))
source of type vector;source-start of type range-start;destination of type vector;destination-start of type range-start;destination-end of type range-end;undefined;scheme:base -- (scheme base);scheme -- (scheme);(vector-copy! to at from) (vector-copy! to at from start) (vector-copy! to at from start end)Domain: It is an error if
atis less than zero or greater than the length ofto. It is also an error if(- (vector-length to) at)is less than(- end start).Copies the elements of vector
frombetweenstartandendto vectorto, starting atat. The order in which elements are copied is unspecified, except that if the source and destination overlap, copying takes place as if the source is first copied into a temporary vector and then into the destination. This can be achieved without allocating storage by making sure to copy in the correct direction in such circumstances.(define a (vector 1 2 3 4 5)) (define b (vector 10 20 30 40 50)) (vector-copy! b 1 a 0 2) b ===> #(10 1 2 40 50)
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.