|
|
|
|
|
Description |
|
|
Synopsis |
|
|
|
|
Queue type
|
|
|
Instances | |
|
|
Operators
|
|
|
O(n). Append two queues, see append.
|
|
Query
|
|
|
O(1). Is the queue empty?
|
|
|
O(n). The number of elements in the queue.
|
|
|
O(1). The element in front of the queue. Raises an error
when the queue is empty.
|
|
|
O(1). The tail of the queue.
Raises an error when the queue is empty.
|
|
|
O(1). The head and tail of the queue.
|
|
Construction
|
|
|
O(1). The empty queue.
|
|
|
O(1). A queue of one element.
|
|
|
O(1). Insert an element at the back of a queue.
|
|
|
O(n). Append two queues.
|
|
Filter
|
|
|
O(n). Filter elements according to some predicate.
|
|
|
O(n). Partition the elements according to some predicate.
|
|
Fold
|
|
|
O(n). Fold over the elements from left to right (ie. head to tail).
|
|
|
O(n). Fold over the elements from right to left (ie. tail to head).
|
|
Conversion
|
|
|
O(n). The elements of a queue.
|
|
List
|
|
|
O(n). Convert to a list.
|
|
|
O(n). Convert from a list.
|
|
Produced by Haddock version 2.4.2 |