Next: chains inspection, Previous: chains intro, Up: chains [Index]
Chains are doubly–linked lists composed of <chain-link>
instances. In this documentation: chain objects arguments to functions
are indicated as chain, and they can be either null or instances
of <chain-link>
.
The following syntactic bindings are exported by the library
(vicare containers chains)
. The bindings whose name is prefixed
with $
are unsafe operations: they do not validate their
arguments before accessing them.
Record type representing a link in a chain. The <chain-link>
type is non–generative and available for subtyping. In this
documentation <chain-link>
object arguments to functions are
indicated as link.
Build and return a new instance of <chain-link>
referencing
obj as payload object.
Return #t
if obj is an instance of <chain-link>
;
otherwise return #f
.
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.
Return #t
if obj is null or a a record of type
<chain-link>
; otherwise return #f
.
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
follows:
(make-hashtable chain-link-hash eq?)
Next: chains inspection, Previous: chains intro, Up: chains [Index]