Commit 8d528697 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Added MySet.mli.

parent 1200a8c1
(* This is a stripped-down copy of the [Set] module from OCaml's standard
library. The only difference is that [add x t] guarantees that it returns
[t] (physically unchanged) if [x] is already a member of [t]. This yields
fewer memory allocations and an easy way of testing whether the element was
already present in the set before it was added. *)
module Make (Ord: Map.OrderedType) : sig
type elt = Ord.t
type t
val empty: t
val add: elt -> t -> t
val find: elt -> t -> elt (* may raise [Not_found] *)
val iter: (elt -> unit) -> t -> unit
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment