[ top | up ]

Environment Access

Syntax

environment(x=null)
environment(x) <- value

Description

If x is a function then environment(x) returns the environment associated with that function. If x is null then the global environment is returned.

The assignment form sets the environment of the function x to the value given.

It is an error for x to be anything besides a function or null.