Chains are doubly–linked lists composed of
instances. In this documentation: chain objects arguments to functions
are indicated as chain, and they can be either null or instances
The following syntactic bindings are exported by the library
(vicare containers chains). The bindings whose name is prefixed
$ are unsafe operations: they do not validate their
arguments before accessing them.
Record type representing a link in a chain. The
type is non–generative and available for subtyping. In this
<chain-link> object arguments to functions are
indicated as link.
Build and return a new instance of
obj as payload object.
#t if obj is an instance of
Build and return a new chain holding the given objects, which are pushed on the chain from right to left. If no arguments are given: return null.
#t if obj is null or a a record of type
<chain-link>; otherwise return
Return the payload object referenced by link.
Store a new object as payload for link.
Add a new property key to the property list of link; key must be a symbol. If key is already set: the old entry is mutated to reference the new value.
Return the value of the property key in the property list of
link; if key is not set: return
#f. key must
be a symbol.
Remove the property key from the property list of link; if key is not set: nothing happens. key must be a symbol.
Return a new association list representing the property list of link. The order of the entries is the same as the property creation order.
Return an exact integer to be used as hashtable key for link.
Hashtables having a
<chain-link> as key can be instantiated as
(make-hashtable chain-link-hash eq?)