Imperative programming in Scheme
- slide 4 : 6
String mutators
A string can be mutated by the
string-set!
and the
string-fill!
procedures
The string mutator procedures:
(string-set! str k chr)
changes character number
k
in
str
to
chr
(string-fill! str chr)
changes every character in
str
to
chr
There are similar functions that mutate the elements in vectors
R5RS: Strings Scheme
R5RS: Vectors in Scheme