Linked_queue is a wrapper around OCaml's standard Queue module that follows Core idioms and adds some functions.
Differences from the standard module:
add, and takes the queue first.
take, takes the queue first, and returns an
option rather than raising
dequeue_exn is available if you want to raise
iter takes a labeled argument.
transfer's arguments are labeled.
dequeue t returns
t is empty, otherwise it removes and returns
the front of
peek t returns
t is empty, otherwise it returns
Some x where
x is the front of
filter_inplace t ~f removes all elements of
t that don't satisfy
of_list list returns a queue
t with the elements of
list in the same
order as the elements of
list (i.e. the first element of
t is the first
element of the list).
partial_iter t ~f iterates through t until f returns `Stop