Reference

Set

New
Input A list of elements.
Output A set containing the list of elements.

Signature

Example

Add
Input A set and an element.
Output A new set containing the element.

Signature

Example

Remove
Input A set and an element.
Output A new set without the element.

Signature

Example

Contains
Input A set and an element.
Output True if the set contains the element, false otherwise.

Signature

Example

Is Empty
Input A set.
Output True if the set is empty, false otherwise.

Signature

Example

Is Not Empty
Input A set.
Output True if the set is not empty, false otherwise.

Signature

Example

Length
Input A set.
Output The number of elements in the set.

Signature

Example

Union
Input Two sets.
Output A new set containing all elements from both sets.

Signature

Example

Intersection
Input Two sets.
Output A new set containing only elements that are in both sets.

Signature

Example

Difference
Input Two sets.
Output A new set containing elements from the first set that are not in the second set.

Signature

Example