Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / set / disjoint-collection.sig
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8signature DISJOINT_COLLECTION =
9 sig
10 structure S :
11 sig
12 type 'a t
13
14 val value: 'a t -> 'a
15 val setValue: 'a t * 'a -> unit
16 val equals: 'a t * 'a t -> bool
17 end
18
19 type 'a t
20
21 val empty: unit -> 'a t
22 val new: 'a list -> 'a t * 'a S.t list
23
24 val addSingleton: 'a t * 'a -> 'a S.t
25
26 val numSets: 'a t -> int
27
28 val randomSet: 'a t -> 'a S.t
29 val random: 'a t -> 'a
30
31 val union: 'a t * 'a S.t * 'a S.t -> unit
32 end