| vector-copy!(3scm) | Scheme Programmer's Manual | vector-copy!(3scm) |
NAME
vector-copy! - copy elements between vectors
LIBRARY
(import (scheme base)) ;R7RS
SYNOPSIS
(vector-copy! to at from) (vector-copy! to at from start) (vector-copy! to at from start end)
DESCRIPTION
Copies the elements of the vector from between start and end to vector to, starting at at.
IMPLEMENTATION NOTES
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.
RETURN VALUES
Returns an unspecified value.
EXAMPLES
(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)
COMPATIBILITY
This procedure is unique to R7RS. Compatible procedures can be found in SRFI-43 and SRFI-133.
ERRORS
It is an error if the wrong number of arguments was passed or an argument was outside its domain. It is an error if at is less than zero or greater than the length of to. It is also an error if (- (vector-length to) at) is less than (- end start). Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically.
SEE ALSO
vector-copy(3scm)
STANDARDS
R7RS
HISTORY
R7RS got this procedure from SRFI-43.
AUTHORS
This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.
| 2023-01-26 |