module Hash_queue: Hash_queue
val __pa_ounit_275876e34cf609db118f3d84b799a790 : string
module List: Core_list
module Array: Core_array
module Hashtbl: Core_hashtbl
module type Key = Hashtbl.Key
module type S = sig
.. end
module Make: functor (
Key
:
Key
) ->
sig
.. end
a hash-queue, where the values are of type 'a
invariant t
checks the invariants of the queue.
create ()
returns an empty queue.
clear the queue
mem q k
returns true iff there is some (k, v) in the queue.
lookup t k
returns the value of the key-value pair in the queue with
key k, if there is one.
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.
first t
returns the front element of the queue, without removing it.
keys t
returns the keys in the order of the queue.
dequeue t
returns the front element of the queue.
dequeue_with_key t
returns the front element of the queue and its key
dequeue_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.
replace q k v
changes the value of key k in the queue to v.
iter t ~f
applies f to each key and element of the queue.