This structure provides fast access to its front and back elements, with O(1) operations.
equal a b
checks whether a
and b
contain the same sequence of
elements.
compare a b
compares lexicographically a
and b
.
Create a deque from the sequence.
Optional argument deque
disappears, use add_seq_back instead.
add_seq_front q seq
adds elements of seq
into the front of q
,
in reverse order.
O(n)
in time, where n
is the number of elements to add.
add_seq_back q seq
adds elements of seq
into the back of q
,
in order.
O(n)
in time, where n
is the number of elements to add.
val to_list : 'a t ‑> 'a list
List of elements, in order. Less efficient than to_rev_list.