module Make: functor (
Key
:
Key
) ->
sig
.. end
module Key: Key
type 'a
t = {
|
queue : 'a Key_value.t Doubly_linked.t ; |
|
table : 'a Key_value.t Elt.t Table.t ; |
}
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val length : 'a t -> int
val is_empty : 'a t -> bool
val find_opt : 'a t -> Table.key -> 'a option
val mem : 'a t -> Table.key -> bool
type 'a
container = 'a t
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val find : 'a t -> f:('a -> bool) -> 'a Option.t
val enqueue : 'a t ->
Table.key -> 'a -> [> `Key_already_present | `Ok ]
val dequeue_with_key : 'a t -> (Key.t * 'a) Option.t
val dequeue : 'a t -> 'a option
val iter_keys : 'a t ->
f:(key:Key.t -> data:'a -> unit) -> unit
val iter : 'a t -> f:('a -> unit) -> unit
val fold_keys : 'a t ->
init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
val fold : 'a t -> init:'b -> f:('b -> 'a -> 'b) -> 'b
val dequeue_all : 'a t -> f:('a -> 'b) -> unit
val remove : 'a t -> Table.key -> [> `No_such_key | `Ok ]
val replace : 'a t ->
Table.key -> 'a -> [> `No_such_key | `Ok ]