![]() |
| ||||||
Navigation |
Synopsis Union of two set values.
Syntax
Exp1 + Exp2
Types
Description The
+ operator computes set union if both operands are sets. If one of the operands is not a set, it acts as Set/Insert instead.
Examples
rascal>{1, 2, 3} + {4, 5, 6}; set[int]: {1,2,3,4,5,6} rascal>{1,2,3} + {2,3,4}; set[int]: {1,2,3,4} rascal>{1, 2, 3} + {3}; set[int]: {1,2,3} rascal>{2} + { 2, 3, 4}; set[int]: {2,3,4} Questions
Question [1].
![]() ![]()
Question [2].
![]() ![]()
Question [3].
![]() ![]()
Question [4].
![]() ![]()
Question [5].
![]() ![]()
Question [6].
![]() ![]() ![]() |