Plus Operator
The "+" operator covers multiple operations:
- addition of numbers
- concatenation of strings (for that use case, prefer the "&" operator)
- offsetting of dates/times
- concatenation of lists, and values into lists
The type of operation is determined by the left operand, the right operand being converted, as needed:
| Expression | Result |
number + right | Numerical: right is converted into a numerical value, as needed. |
string + right | String: right is converted into its string representation, as needed. |
date + right | Date: the date is shifted by a number of days (or fraction thereof).right is converted into its numerical representation, as needed. |
list + right | List: right is added to the end of list, and the result is eventually flattened. |
Examples
"2" + 2 = 222 + "2" = 4List(1) + 2 = List(1, 2)List(1, 2) + List(3, 4) = List(1, 2, 3, 4)