2.13 stack-queue
(require sicm/general/stack-queue) | package: rktsicm |
This module provides a simple stack-queue. It is used internally by the ambigous operator. As a data structure, it is not recomended.
procedure
Creates a new empty stack&queue.
procedure
(stack&queue? obj) → boolean?
obj : any/c
Check if on object is a stack&queue?.
procedure
(stack&queue-empty? sq) → boolean?
sq : stack&queue?
Check if sq is an empty stack&queue?.
procedure
sq : stack&queue? val : any/c
procedure
(add-to-end! sq val) → void
sq : stack&queue? val : any/c
Adds val to the front or end of the stack&queue?.
procedure
sq : stack&queue?
Get the first element of the stack&queue?, leaving the stack&queue? that element shorter.