CCFQueueFunctional queues
type 'a printer = Stdlib.Format.formatter -> 'a -> unitval empty : 'a tval is_empty : 'a t -> boolval singleton : 'a -> 'a tval doubleton : 'a -> 'a -> 'a tSame as take_front, but fails on empty queues.
take_front_l n q takes at most n elements from the front of q, and returns them wrapped in a list.
take_back_l n q removes and returns the last n elements of q. The elements are in the order of the queue, that is, the head of the returned list is the first element to appear via take_front. take_back_l 2 (of_list [1;2;3;4]) = of_list [1;2], [3;4].
val first : 'a t -> 'a optionFirst element of the queue.
val last : 'a t -> 'a optionLast element of the queue.
val last_exn : 'a t -> 'aval nth : int -> 'a t -> 'a optionReturn the i-th element of the queue in logarithmic time.
Append two queues. Elements from the second one come after elements of the first one. Linear in the size of the second queue.
val size : 'a t -> intNumber of elements in the queue (constant time).
val fold : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'bval iter : ('a -> unit) -> 'a t -> unitval of_list : 'a list -> 'a tval to_list : 'a t -> 'a listval add_seq_front : 'a Stdlib.Seq.t -> 'a t -> 'a tval add_seq_back : 'a t -> 'a Stdlib.Seq.t -> 'a tval to_seq : 'a t -> 'a Stdlib.Seq.tval of_seq : 'a Stdlib.Seq.t -> 'a tval (--) : int -> int -> int ta -- b is the integer range from a to b, both included.
val (--^) : int -> int -> int ta -- b is the integer range from a to b, where b is excluded.