Module Worklist


module Worklist: sig  end
Worklist.

This module implements a worklist.


type 'a t 
The type of a worklist.
val empty : unit -> 'a t
Returns an empty worklist.
val clear : 'a t -> unit
Empty a worklist.
val is_empty : 'a t -> bool
is_empty w returns true if and only if w contains no elements, otherwise it returns false.
val mem : 'a t -> 'a -> bool
mem w x returns true if and only if w contains x, otherwise it returns false.
val choose : 'a t -> 'a
Returns an element of the worklist.
val remove : 'a t -> 'a -> unit
Removes an element from the worklist.
val add : 'a t -> 'a list -> unit
add w l adds every element of list l to the worklist w.
val extract : 'a t -> 'a
extract w extracts and removes an element from the worklist. The chosen element is returned. It is a combination of the functions Worklist.choose and Worklist.remove.
val single : 'a -> 'a t
single x returns a worklist containing only the element x.
val union : 'a t -> 'a t -> unit
union w1 w2 adds all elements of worklist w2 to worklist w1.