vector-fill! - fill a vector
(import (rnrs)) ;R6RS
(import (rnrs base)) ;R6RS
(import (scheme r5rs)) ;R7RS
(import (scheme base)) ;R7RS
(vector-fill! vector obj)
(vector-fill! vector obj start) ;R7RS
(vector-fill! vector obj start end) ;R7RS
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.
- R6RS
- Returns unspecified values.
- R7RS
- Returns an unspecified value.
;; 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)
The R7RS variant of this procedure has extra arguments.
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.
This procedure first appeared in R2RS.