chickadee » environments » environment-extend!

environment-extend! ENV SYMBOL #!optional VALUE MUTABLE?procedure

Adds a new binding SYMBOL in environment ENV.

If the optional argument MUTABLE? is not given or #t, then the binding is mutable and can be changed by evaluating (set! VARIABLE ...).

The variable SYMBOL is initialized to VALUE, or is unbound, if VALUE is not given.

Here the creation of a new variable in an inextensible environment will succeed.

Changing the value of an immutable variable will succeed.