-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathextSet.mli
More file actions
29 lines (25 loc) · 775 Bytes
/
extSet.mli
File metadata and controls
29 lines (25 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(* Copyright (c) 2010 Mauricio Fernández <mfp@acm.org> *)
(** Sets with extra functionality *)
module type S =
sig
include Set.S
(** Return the "next" element when considering the set as a circular list.
* [next e t] returns either the first element greater than [e], or
* [min_elt t] if there is none.
* @raise Not_found if the set is empty.
* *)
val next : elt -> t -> elt
end
module Make : functor (Ord : Set.OrderedType) -> S with type elt = Ord.t
module Make_lean : functor (Ord : Set.OrderedType) ->
sig
type t
val empty : t
val cardinal : t -> int
val is_empty : t -> bool
val singleton : Ord.t -> t
val iter : (Ord.t -> unit) -> t -> unit
val remove : Ord.t -> t -> t
val add : Ord.t -> t -> t
val union : t -> t -> t
end