Module type Assign05.INT_SET

type t

t is the type used to represent a finite set of integers.

val empty : t

empty is the empty set \emptyset (the set with no elements).

val singleton : int -> t

singleton n is the set \{n\}.

val mem : int -> t -> bool

mem x s is true if and only if x is a member of s.

val card : t -> int

card s is the number of elements in s.

val union : t -> t -> t

union s1 s2 is the set in contains the elements which appear in s1 or s2.