12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849moduletypeOps=sigtype'attype('x,'fn)fnvalis_empty:('x,'at->bool)fn(** [is_empty s] determines whether the queue [q] is empty. *)vallength:('x,'at->int)fn(** [length q] returns the length of the queue [q]. *)valclear:('x,'at->unit)fn(** [clear q] removes all elements from the queue [q]. *)valswap:('x,'at->'at->unit)fn(** [swap q1 q2] exchanges the contents of the queues [q1] and [q2]. *)valto_seq:('x,'at->'aSeq.t)fn(** [to_seq s] returns a domain safe sequence for iterating through the
elements of the queue front to back.
The sequence is based on a constant time, [O(1)], snapshot of the queue
and modifications of the queue have no effect on the sequence. *)valadd:('x,'a->'at->unit)fn(** [add x q] adds the element [x] at the end of the queue [q]. *)valpush:('x,'a->'at->unit)fn(** [push] is a synonym for {!add}. *)valpeek_opt:('x,'at->'aoption)fn(** [peek_opt q] returns the first element in queue [q], without removing it
from the queue, or returns [None] if the queue is empty. *)valpeek_blocking:('x,'at->'a)fn(** [peek_blocking q] returns the first element in queue [q], without removing
it from the queue, or blocks waiting for the queue to become non-empty. *)valtake_blocking:('x,'at->'a)fn(** [take_blocking q] removes and returns the first element in queue [q], or
blocks waiting for the queue to become non-empty. *)valtake_opt:('x,'at->'aoption)fn(** [take_opt q] removes and returns the first element in queue [q], or
returns [None] if the queue is empty. *)valtake_all:('x,'at->'aSeq.t)fn(** [take_all q] removes and returns a domain safe sequence for iterating
through all the elements that were in the queue front to back. *)end