LazyEnvir : EnvironmentRedirect : Object

lazy environment
Subclasses: ProxySpace


Environment with deferred evaluation and default values.

Consequently, calculations can be done with nonexisting objects which can then be assigned later. Per default, a LazyEnvir returns instances of Maybe. See also Fdef.

NOTE: While the method put is treated as transparent and implicitly creates a placeholder, all other methods, like at, collect, do, etc. pass the placeholder. In order to retrieve the object itself, use .source - in order to reduce it to a value, use: value

Class Methods

Inherited class methods

Instance Methods

.put(key, obj)

Sets the value of the reference at key.


Returns a reference to the object at key.


Copies the environment into a new one, with each placeholder being copied as well.

.localPut(key, obj)

Sets the value of the key directly. This method is mainly used internally.


.proxyClass = value

Specify what placeholder object the environment uses by supplying a class name (Symbol). The default is a Maybe. Any object that responds to the methods source, source_ and clear can be a placeholder.


Removes the placeholder from the environment and clears it.


Returns a new placeholder object. This is used internally and can be overridden to implement other lazy environments.

Inherited instance methods