1 (* Copyright (C) 2009 Matthew Fluet.
2 * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
9 signature SET_STRUCTS =
23 val <= : t * t -> bool
25 val >= : t * t -> bool
26 val add: t * Element.t -> t
27 val areDisjoint: t * t -> bool
28 val contains: t * Element.t -> bool
30 val equals: t * t -> bool
31 val exists: t * (Element.t -> bool) -> bool
32 val fold: t * 'a * (Element.t * 'a -> 'a) -> 'a
33 val forall: t * (Element.t -> bool) -> bool
34 val foreach: t * (Element.t -> unit) -> unit
35 (* list must contain no duplicates *)
36 val fromList: Element.t list -> t
37 val intersect: t * t -> t
38 val isEmpty: t -> bool
39 val layout: t -> Layout.t
40 val map: t * (Element.t -> Element.t) -> t
41 val partition: t * (Element.t -> bool) -> {yes: t, no: t}
42 val power: t -> t list
43 val replace: t * (Element.t -> Element.t option) -> t
44 val remove: t * Element.t -> t
45 val singleton: Element.t -> t
47 val subset: t * (Element.t -> bool) -> t
48 val subsets: t * int -> t list
49 val subsetSize: t * (Element.t -> bool) -> int
50 val toList: t -> Element.t list
52 val unions: t list -> t