Assign05.INT_SET
type t
t is the type used to represent a finite set of integers.
t
val empty : t
empty is the empty set \emptyset (the set with no elements).
empty
\emptyset
val singleton : int -> t
singleton n is the set \{n\}.
singleton n
\{n\}
val mem : int -> t -> bool
mem x s is true if and only if x is a member of s.
mem x s
true
x
s
val card : t -> int
card s is the number of elements in s.
card s
val union : t -> t -> t
union s1 s2 is the set in contains the elements which appear in s1 or s2.
union s1 s2
s1
s2