Lecture 9 - Page 4 : 6
Functional Programming in Scheme
Imperative programming in Scheme
* Imperative Scheme constructs
Imperative Scheme Constructs
List mutators
String mutators
* Imperative features in LAML
Imperative features in LAML
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