module Hash_queue:Hash_queue.Swith type Key.t = t
module Key:Hash_queue.Key
type 'a t
include Container.S1
val invariant : 'a t -> unitinvariant t checks the invariants of the queue.val create : unit -> 'a tcreate () returns an empty queue.val clear : 'a t -> unitval mem : 'a t -> Key.t -> boolmem q k returns true iff there is some (k, v) in the queue.val lookup : 'a t -> Key.t -> 'a optionlookup t k returns the value of the key-value pair in the queue with
key k, if there is one.val lookup_exn : 'a t -> Key.t -> 'aval enqueue : 'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]enqueue t k v adds the key-value pair (k, v) to the end of the queue,
returning `Ok if the pair was added, or `Key_already_present
if there is already a (k, v') in the queue.val enqueue_exn : 'a t -> Key.t -> 'a -> unitval first : 'a t -> 'a optionfirst t returns the front element of the queue, without removing it.val keys : 'a t -> Key.t listkeys t returns the keys in the order of the queue.val dequeue : 'a t -> 'a optiondequeue t returns the front element of the queue.val dequeue_exn : 'a t -> 'aval dequeue_with_key : 'a t -> (Key.t * 'a) optiondequeue_with_key t returns the front element of the queue and its keyval dequeue_with_key_exn : 'a t -> Key.t * 'aval dequeue_all : 'a t -> f:('a -> unit) -> unitdequeue_all t ~f dequeues every element of the queue and applies f to each
one.
remove q k removes the key-value pair with key k from the queue.
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]val remove_exn : 'a t -> Key.t -> unitval replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]replace q k v changes the value of key k in the queue to v.val replace_exn : 'a t -> Key.t -> 'a -> unitval iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unititer t ~f applies f to each key and element of the queue.val foldi : 'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b