![]() |
| |||||||||
Navigation |
Synopsis The difference between two sets.
Syntax
Exp1 - Exp2
Types
Description If both
Exp1 and Exp2 have a set as value, the result is the difference of these two set values.
If Exp2 does not have a set as value, it is first converted to a set before the difference is computed.
The difference is computed by removing all elements of the second set from the first set.
Examples
rascal>{1, 2, 3, 4} - {1, 2, 3}; set[int]: {4} rascal>{1, 2, 3, 4} - {3}; set[int]: {1,2,4} rascal>{1, 2, 3, 4} - 3; set[int]: {1,2,4} rascal>{1, 2, 3, 4} - {5, 6, 7}; set[int]: {1,2,3,4} Questions
Question [1].
![]() ![]()
Question [2].
![]() ![]()
Question [3].
![]() ![]()
Question [4].
![]() ![]()
Question [5].
![]() ![]()
Question [6].
![]() ![]() ![]() |