The minus operator is an infixed operator that can find the set difference of the elements of two sets or lists; the result will always be a set.
Examples.
⟦ 1,2 ⟧ |
⟦ 1,2 ⟧ |
To define an n-tuple (rather than a list of n objects), you can put the elements, separated by commas, inside the delimiters tuple[ and ].
Example.
Input:
Output:
⟦ tuple | ⎡ ⎣ | 1,3,4 | ⎤ ⎦ | ,tuple | ⎡ ⎣ | 1,3,5 | ⎤ ⎦ | ,tuple | ⎡ ⎣ | 2,3,4 | ⎤ ⎦ | ⟧ |
You can compute the Cartesian product of two sets with the infixed * operator.
Examples.
⟦ tuple[1,3], tuple[1,4], tuple[2,3], tuple[2,4] ⟧ |
⟦ tuple[1,3,5],tuple[1,3,6],tuple[1,4,5],tuple[1,4,6], tuple[2,3,5],tuple[2,3,6],tuple[2,4,5],tuple[2,4,6]⟧ |