Set operations¶
The union or intersection of two finite sets can be found using
the union
and intersect
operators, or using the Unicode
notation ∪
and ∩
.
Disco> {1,2,3} union {2,3,4}
{1, 2, 3, 4}
Disco> {1,2,3} intersect {2,3,4}
{2, 3}
The union or intersection of two finite sets can be found using
the union
and intersect
operators, or using the Unicode
notation ∪
and ∩
.
Disco> {1,2,3} union {2,3,4}
{1, 2, 3, 4}
Disco> {1,2,3} intersect {2,3,4}
{2, 3}