Queue
Edit on GitHubAn immutable queue implementation. A queue is a FIFO (first-in-first-out) data structure where new values are added to the end and retrieved or removed from the beginning.
Values
Queue.make
Creates a new queue.
Queue.isEmpty
Checks if the given queue contains no elements.
Queue.head
Returns Some(item)
with the next item in the queue, or None
if the queue is empty.
Queue.enqueue
Adds an item to the end of the queue.
Queue.dequeue
Removes the next item in the queue.
Queue.size
Computes the size of the input queue.