Up

Module Dequeue = Core_kernel.Dequeue

Signature

type 'a t = 'a Core_kernel.Deque.t
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_read_t : 'a Bin_prot.Read.reader -> 'a t Bin_prot.Read.reader
val __bin_read_t__ : 'a Bin_prot.Read.reader -> (int -> 'a t) Bin_prot.Read.reader
val bin_size_t : 'a Bin_prot.Size.sizer -> 'a t Bin_prot.Size.sizer
val bin_write_t : 'a Bin_prot.Write.writer -> 'a t Bin_prot.Write.writer
val binary_search_segmented : ('a t, 'a) Core_kernel.Binary_searchable_intf.binary_search_segmented
val mem : ?equal:('a -> 'a -> bool) -> 'a t -> 'a -> bool
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold : 'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum : (module Core_kernel.Commutative_group.S with type t = 'sum) -> 'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
val create : ?initial_length:int -> ?never_shrink:bool -> unit -> 'a t
val front_index : 'a t -> int option
val front_index_exn : 'a t -> int
val back_index : 'a t -> int option
val back_index_exn : 'a t -> int
val get_opt : 'a t -> int -> 'a option
val get : 'a t -> int -> 'a
val peek : 'a t -> [
| `back
| `front
] -> 'a option
val peek_front : 'a t -> 'a option
val peek_front_exn : 'a t -> 'a
val peek_back : 'a t -> 'a option
val peek_back_exn : 'a t -> 'a
val set_exn : 'a t -> int -> 'a -> unit
val iter' : 'a t -> [
| `back_to_front
| `front_to_back
] -> f:('a -> unit) -> unit
val iteri : 'a t -> f:(int -> 'a -> unit) -> unit
val iteri' : 'a t -> [
| `back_to_front
| `front_to_back
] -> f:(int -> 'a -> unit) -> unit
val fold' : 'a t -> [
| `back_to_front
| `front_to_back
] -> init:'b -> f:('b -> 'a -> 'b) -> 'b
val foldi : 'a t -> init:'b -> f:(int -> 'b -> 'a -> 'b) -> 'b
val foldi' : 'a t -> [
| `back_to_front
| `front_to_back
] -> init:'b -> f:(int -> 'b -> 'a -> 'b) -> 'b
val enqueue : 'a t -> [
| `back
| `front
] -> 'a -> unit
val enqueue_front : 'a t -> 'a -> unit
val enqueue_back : 'a t -> 'a -> unit
val clear : 'a t -> unit
val drop : ?n:int -> 'a t -> [
| `back
| `front
] -> unit
val drop_front : ?n:int -> 'a t -> unit
val drop_back : ?n:int -> 'a t -> unit
val dequeue : 'a t -> [
| `back
| `front
] -> 'a option
val dequeue_exn : 'a t -> [
| `back
| `front
] -> 'a
val dequeue_front : 'a t -> 'a option
val dequeue_front_exn : 'a t -> 'a
val dequeue_back : 'a t -> 'a option
val dequeue_back_exn : 'a t -> 'a