Module set
Functions
delete (s, e) | Delete an element from a set |
difference (s, t) | Find the difference of two sets |
equal (s, t) | Find whether two sets are equal |
insert (s, e) | Insert an element into a set |
intersection (s, t) | Find the intersection of two sets |
member (s, e) | Say whether an element is in a set |
propersubset (s, t) | Find whether one set is a proper subset of another |
subset (s, t) | Find whether one set is a subset of another |
symmetric_difference (s, t) | Find the symmetric difference of two sets |
union (s, t) | Find the union of two sets |
Functions
- delete (s, e)
-
Delete an element from a set
Parameters
- s: set
- e: element
- difference (s, t)
-
Find the difference of two sets
Parameters
- s: set
- t: set
Return value:
s with elements of t removed - equal (s, t)
-
Find whether two sets are equal
Parameters
- s: set
- t: set
Return value:
true
if sets are equal,false
otherwise - insert (s, e)
-
Insert an element into a set
Parameters
- s: set
- e: element
- intersection (s, t)
-
Find the intersection of two sets
Parameters
- s: set
- t: set
Return value:
set intersection of s and t - member (s, e)
-
Say whether an element is in a set
Parameters
- s: set
- e: element
Return value:
true
if e is in set,false
otherwise - propersubset (s, t)
-
Find whether one set is a proper subset of another
Parameters
- s: set
- t: set
Return value:
true
if s is a proper subset of t, false otherwise - subset (s, t)
-
Find whether one set is a subset of another
Parameters
- s: set
- t: set
Return value:
true
if s is a subset of t,false
otherwise - symmetric_difference (s, t)
-
Find the symmetric difference of two sets
Parameters
- s: set
- t: set
Return value:
elements of s and t that are in s or t but not both - union (s, t)
-
Find the union of two sets
Parameters
- s: set
- t: set
Return value:
set union of s and t