Next: queues inspection, Up: queues [Index]
Queues are implemented as doubly–linked lists of vector objects; each vector acts as buffer for contained objects; all the vectors have the same length.
The following syntactic bindings are exported by the library
(vicare containers queues)
.
Record type representing a queue object. The <queue>
type is
non–generative and available for subtyping. In this documentation
<queue>
object arguments to functions are indicated as
queue.
Build and return a new <queue>
object. The optional argument
buffer-length must be a non–negative fixnum representing the
number of slots in the internal object buffers; when not given, it
defaults to 15.
Return #t
if obj is a record of type <queue>
;
otherwise return #f
.
Build and return a <queue>
object holding the given objects,
which are pushed on the queue left to right from the rear side. The
size of the internal buffers is set to the default.
(define D (queue 0 1 2)) (queue-front D) ⇒ 0 (queue-rear D) ⇒ 2
Add a new property key to the property list of queue; 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
queue; if key is not set: return #f
. key must
be a symbol.
Remove the property key from the property list of queue; if key is not set: nothing happens. key must be a symbol.
Return a new association list representing the property list of queue. The order of the entries is the same as the property creation order.
Return an exact integer to be used as hashtable key for queue.
Hashtables having a <queue>
as key can be instantiated as
follows:
(make-hashtable queue-hash eq?)
Next: queues inspection, Up: queues [Index]