module Dequeue: Dequeue
type 'a
t
val create : ?never_shrink:bool -> ?initial_index:int -> dummy:'a -> unit -> 'a t
val length : 'a t -> int
val is_empty : 'a t -> bool
val front_index : 'a t -> int
val back_index : 'a t -> int
val get_exn : 'a t -> int -> 'a
val get_front : 'a t -> 'a option
val get_front_exn : 'a t -> 'a
val get_back : 'a t -> 'a option
val get_back_exn : 'a t -> 'a
val set_exn : 'a t -> int -> 'a -> unit
val iteri : f:(int -> 'a -> unit) -> 'a t -> unit
val iter : f:('a -> unit) -> 'a t -> unit
val foldi : f:('a -> int -> 'b -> 'a) -> init:'a -> 'b t -> 'a
val fold : f:('a -> 'b -> 'a) -> init:'a -> 'b t -> 'a
val push_front : 'a t -> 'a -> unit
val push_back : 'a t -> 'a -> unit
val clear : 'a t -> unit
clear t
removes all elements from t
.
val drop_front_exn : ?n:int -> 'a t -> unit
val drop_back_exn : ?n:int -> 'a t -> unit
val take_front_exn : 'a t -> 'a
val take_back_exn : 'a t -> 'a
val drop_indices_less_than_exn : 'a t -> int -> unit
val drop_indices_greater_than_exn : 'a t -> int -> unit
val invariant : 'a t -> unit
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val bin_t : 'a Bin_prot.Type_class.t -> 'a t Bin_prot.Type_class.t
val bin_read_t : 'a Bin_prot.Unsafe_read_c.reader -> 'a t Bin_prot.Read_ml.reader
val bin_read_t_ : 'a Bin_prot.Unsafe_read_c.reader ->
'a t Bin_prot.Unsafe_read_c.reader
val bin_read_t__ : 'a Bin_prot.Unsafe_read_c.reader ->
(int -> 'a t) Bin_prot.Unsafe_read_c.reader
val bin_reader_t : 'a Bin_prot.Type_class.reader -> 'a t Bin_prot.Type_class.reader
val bin_size_t : 'a Bin_prot.Size.sizer -> 'a t Bin_prot.Size.sizer
val bin_write_t : 'a Bin_prot.Unsafe_write_c.writer -> 'a t Bin_prot.Write_ml.writer
val bin_write_t_ : 'a Bin_prot.Unsafe_write_c.writer ->
'a t Bin_prot.Unsafe_write_c.writer
val bin_writer_t : 'a Bin_prot.Type_class.writer -> 'a t Bin_prot.Type_class.writer
clear t
removes all elements from t
.