module Make:
| Parameters: |
|
type t
val size : t -> intNumber of elements in the collection. Constant time.
val mem : E.t -> t -> boolLog complexity.
val get : int -> t -> E.traises Not_found. Log complexity.
val index : E.t -> t -> intraise Not_found. Log complexity.
val is_empty : t -> bool
val empty : t
val add : E.t -> t -> tLog complexity.
val remove : E.t -> t -> tLog complexity.
val filter : (E.t -> bool) -> t -> tLinear.
val update : E.t option -> E.t option -> t -> int * int * tupdate x y t replaces x by y
and returns the range a..b of modified indices.
Log complexity.
val iter : (E.t -> unit) -> t -> unitLinear.
val iteri : (int -> E.t -> unit) -> t -> unitLinear.