diff options
Diffstat (limited to 'stdlib/set.mli')
-rw-r--r-- | stdlib/set.mli | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/stdlib/set.mli b/stdlib/set.mli index fc4a1f4be6..69b0895f1e 100644 --- a/stdlib/set.mli +++ b/stdlib/set.mli @@ -136,6 +136,15 @@ module type S = (** Return one element of the given set, or raise [Not_found] if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets. *) + + val split: elt -> t -> t * bool * t + (** [split x s] returns a triple [(l, present, r)], where + [l] is the set of elements of [s] that are + strictly less than [x]; + [r] is the set of elements of [s] that are + strictly greater than [x]; + [present] is [false] if [s] contains no element equal to [x], + or [true] if [s] contains an element equal to [x]. *) end (** Output signature of the functor {!Set.Make}. *) |