Previous: , Up: queues   [Index]


37.10 Miscellaneous operations on queues

The following syntactic bindings are exported by the library (vicare containers queues). The syntactic bindings whose name is prefixed with $ are unsafe operations: they do not validate their arguments before accessing them.

Function: queue-copy! dst-queue src-queue
Function: $queue-copy! dst-queue src-queue

Iterate over all the objects in src-queue, starting from the front side, and push them in the rear side of dst-queue. This is a shallow copy: the very objects from the source queue are added to the destination queue; if we need to duplicate the objects, we can use the map operation.

The dst-queue argument allows us to build the destination queue with the desired configuration parameters.

Function: queue-reverse! dst-queue src-queue
Function: $queue-reverse! dst-queue src-queue

Iterate over the objects in src-queue, starting from the front side, and push them in the front side of dst-queue. Return dst-queue.

The dst-queue argument allows us to build the destination queue with the desired configuration parameters.