![]() |
| ||||||
Navigation |
Synopsis Concatenate two lists.
Syntax
Exp1 + Exp2
Types
Description The
+ operator concatenates the elements of the two lists in order of appearance.
Note that the same operator is overloaded for List/Insert and List/Append.
Examples
rascal>[1, 2, 3] + [4, 5, 6]; list[int]: [1,2,3,4,5,6] rascal>[] + [1] list[int]: [1] rascal>[1] + [] list[int]: [1] rascal>[1] + [2] + [3] list[int]: [1,2,3]And overloaded usage for insert and append looks like: rascal>1 + [] list[int]: [1] rascal>[] + 1 list[int]: [1] Questions
Question [1].
![]() ![]()
Question [2].
![]() ![]()
Question [3].
![]() ![]()
Question [4].
![]() ![]() ![]() |