| vector-fill!(3scm) | Scheme Programmer's Manual | vector-fill!(3scm) |
NAME
vector-fill! - fill a vector
LIBRARY
(import (rnrs)) ;R6RS (import (rnrs base)) ;R6RS (import (scheme r5rs)) ;R7RS (import (scheme base)) ;R7RS
SYNOPSIS
(vector-fill! vector obj) (vector-fill! vector obj start) ;R7RS (vector-fill! vector obj start end) ;R7RS
DESCRIPTION
Stores obj in every element of vector.
- R7RS
- The operation is limited to the elements between start (inclusive) and end (exclusive). These default to 0 and the length of vector.
RETURN VALUES
EXAMPLES
;; This example is for R7RS (define a (vector 1 2 3 4 5)) (vector-fill! a 'smash 2 4) a => #(1 2 smash smash 5)
COMPATIBILITY
The R7RS variant of this procedure has extra arguments.
ERRORS
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
- The wrong number of arguments was passed or an argument was outside its domain.
- R7RS
- The assertions described above are errors. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically.
SEE ALSO
make-vector(3scm)
STANDARDS
R4RS, R5RS, R6RS, R7RS
HISTORY
This procedure first appeared in R2RS.
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 |