


The standard library Queue api defines access to first-in first-out queues.
The Queue api is implemented by the queue package.
The Queue api source code is in src/lib/src/queue.api.
See also: Priority_Queue.
See also: Threadkit_Queue.
The above information is manually maintained and may contain errors.
api {
Queue X;
exception DEQUEUE;
make_queue : Void -> Queue(X );
clear : Queue(X ) -> Void;
is_empty : Queue(X ) -> Bool;
enqueue : (Queue(X ) , X) -> Void;
dequeue : Queue(X ) -> X;
delete : (Queue(X ) , (X -> Bool)) -> Void;
head : Queue(X ) -> X;
peek : Queue(X ) -> Null_Or(X );
length : Queue(X ) -> Int;
contents : Queue(X ) -> List(X );
apply : (X -> Void) -> Queue(X ) -> Void;
map : (X -> Y) -> Queue(X ) -> Queue(Y );
fold_left : ((X , Y) -> Y) -> Y -> Queue(X ) -> Y;
fold_right : ((X , Y) -> Y) -> Y -> Queue(X ) -> Y;
};


