![]() |
| ||||||
Navigation |
Synopsis add an element in front of a list
Syntax
Exp1 + Exp2
Types
Description The
+ operator can insert an element in front of a list. Note that + is one of the Operators that is overloaded, it is also List/Concatenation and List/Append for example.
Examples
rascal>1 + [] list[int]: [1] rascal>1 + [2] list[int]: [1,2] rascal>1 + [2,3] list[int]: [1,2,3]
Pitfalls
Questions
Question [1].
![]() ![]()
Question [2].
![]() ![]()
Question [3].
![]() ![]() ![]() |