Order_listval root : unit -> tCreate a new ordering with a single element. O(1)
after t inserts a new element to the ordering, greater than t but less than all existing elements greater than t.
O(1) amortized.
before t inserts a new element to the ordering, less than t but greater than all existing elements less than t.
O(1) amortized.
val cardinal : t -> intHow many elements are ordered. O(1)
val forget : t -> unitMemory of every element is retained. When you know you are not going to use an element any longer, forget it to release memory. O(1).
val is_valid : t -> boolAfter calling forget, an element should not be used. You can check if it is the case with is_valid.
val unsafe_check : t -> string -> unit