element

Returns the collection element associated with a particular key.

If no element is associated with key, then the behavior of element depends on whether it was called with a default argument: if a default argument was passed, its value is returned; otherwise, an error is signaled.

All collections are required to implement element.

Exported from

Modifiers

open

Arguments

collectionAn instance of <collection>.
keyAn instance of <object>.
default:An instance of <object>.  The default is #f.

Values

elementAn instance of <object>.
Returns the collection element associated with a particular key.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of collections, aggregate data structures.
The class of all Dylan objects.