chickadee » environments » environment-copy

environment-copy ENV #!optional EXTENSIBLE? SYMBOLS MUTABLE?procedure

Returns a copy of the environment ENV.

EXTENSIBLE? is a boolean. Default is #f.

SYMBOLS is a list of symbol, or #f. Default is #f.

MUTABLE? is a boolean. Default is EXTENSIBLE?.

If EXTENSIBLE? is #t, then evaluated code can create new variable bindings inside the environment.

If SYMBOLS is not #f, then the environment copy will only contain those symbols from the environment ENV. Otherwise a full copy is made.

If MUTABLE? is #t, then evaluated code can set the copied bindings in the environment. If EXTENSIBLE? is not supplied then the copied variable's mutable property is used.

Note that the only way to supply a MUTABLE? value is to supply an EXTENSIBLE? value.