module CCDeque:sig..end
This structure provides fast access to its front and back elements,
with O(1) operations
type 'a t
exception Empty
val create : unit -> 'a tval clear : 'a t -> unitval is_empty : 'a t -> boolval equal : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> boolequal a b checks whether a and b contain the same sequence of
elements.eq : comparison function for elementsval compare : ?cmp:('a -> 'a -> int) -> 'a t -> 'a t -> intcompare a b compares lexicographically a and bcmp : comparison function for elementsval length : 'a t -> intval push_front : 'a t -> 'a -> unitval push_back : 'a t -> 'a -> unitval peek_front : 'a t -> 'aEmpty if emptyval peek_back : 'a t -> 'aEmpty if emptyval take_back : 'a t -> 'aEmpty if emptyval take_front : 'a t -> 'aEmpty if emptyval append_front : into:'a t -> 'a t -> unitappend_front ~into q adds all elements of q at the front
of into
O(length q) in timeval append_back : into:'a t -> 'a t -> unitappend_back ~into q adds all elements of q at the back of into.
O(length q) in timeval iter : ('a -> unit) -> 'a t -> unitval fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'btype'agen =unit -> 'a option
type'asequence =('a -> unit) -> unit
val of_seq : 'a sequence -> 'a tval to_seq : 'a t -> 'a sequenceval of_gen : 'a gen -> 'a tof_gen g makes a deque containing the elements of gval to_gen : 'a t -> 'a genval add_seq_front : 'a t -> 'a sequence -> unitadd_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.val add_seq_back : 'a t -> 'a sequence -> unitadd_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 copy : 'a t -> 'a tval of_list : 'a list -> 'a tval to_list : 'a t -> 'a list
val to_rev_list : 'a t -> 'a listtype'aprinter =Format.formatter -> 'a -> unit
val print : 'a printer -> 'a t printer