vector-set!
-- r7rs
Definition mutator!
;
vector-set!
(from vonuvoli
);Procedure variants:
((vector-not-empty range-offset any) -> (undefined))
vector-not-empty
;range-offset
;any
;undefined
;scheme:base
-- (scheme base)
;scheme
-- (scheme)
;(vector-set! vector k obj)
Domain: It is an error if
k
is not a valid index ofvector
.The
vector-set!
procedure storesobj
in elementk
ofvector
.(let ((vec (vector 0 '(2 2 2 2) "Anna"))) (vector-set! vec 1 '("Sue" "Sue")) vec) ===> #(0 ("Sue" "Sue") "Anna") (vector-set! '#(0 1 2) 1 "doe") ===> #error ; constant vector
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.