Next: , Previous: , Up: Data Structures   [Contents][Index]


5.6.2 Queues

The (chickadee data queue) module provides a mutable queue that is more memory efficient than Guile’s built-in (ice-9 q) module.

Procedure: make-queue

Return a new, empty queue.

Procedure: queue? obj

Return #t if obj is a queue.

Procedure: queue-empty? queue

Return #t if queue is empty.

Procedure: queue-length queue

Return the current length of queue.

Procedure: enqueue! queue item

Add item to queue.

Procedure: dequeue! queue

Remove and return the first item in queue.

Procedure: queue-clear! queue

Remove all items from queue.