Sets and lists are both collections of elements, and so have some operations in common. But lists are different from sets, because for a list, the order is important and the same element can be repeated in a list, while for sets order in not important and each element is unique. See Section 6.40 for operations on lists.
Recall (see Section 5.3.2) that to define a set of elements, you can put the elements, separated by commas, within delimiters %{ and %} or set[ and ].
Example.
Input:
or:
Output:
⟦ 1,2,3,4⟧ |
Also, (see Section 5.3.3) to define a list of elements, you can put the elements, separated by commas, within delimiters [ and ]. Lists are also called vectors.
Example.
Input:
Output:
⎡ ⎣ | 1,2,5 | ⎤ ⎦ |