Operations on lists

Operations on lists are of two types:

If an operation occurs on a list and a non-list value, the non-list value is paired with each element in the list.

The following table shows the pair-wise and permutation operators.

Pair-wise operator

Permutation operator

Meaning

*

**

Multiplication

/

*/

Division

+

*+

Addition

-

*-

Subtraction

>

*>

Greater than

<

*<

Less than

>=

*>=

Greater than or equal to

<=

*<=

Less than or equal to

=

*=

Equal

!=

*!=

Not equal

The following table shows how pair-wise and permutation operators differ.

Operation

Statement

Yields

Concatenation, pair-wise

"A":"B":"C"+"1":"2":"3"

"A":"B":"C"+"1":"2"

"A":"B":"C"+"1"

"A1":"B2":"C3"

"A1":"B2":"C2"

"A1":"B1":C1"

Concatenation, permutation

"A":"B":"C"*+"1":"2":"3"

"A":"B":"C"*+"1":"2"

"A1":"A2":"A3":"B1":"B2":"B3":"C1":"C2":"C3"

"A1":"A2":"B1":"B2":"C1":"C2"

Addition, pair-wise

1:2:3+10:20:30

1:2:3+10:20

1:2:3+10

11:22:33

11:22:23

11:12:13

Addition, permutation

1:2:3*+10:20:30

1:2:3*+10:20

11:21:31:12:22:32:13:23:33

11:21:12:22:13:23

Text equality, pair-wise

"A":"B":"C"="B":"C":"A"

"A":"B":"C"="B":"C"

"B":"B":"C"="B":"C"

0 False

1 True

1

Text equality, permutation

"A":"B":"C"*="B":"C":"A"

"A":"B":"C"*="B":"C"

"B":"B":"C"*="D":"E"

1

1

0

Number equality, pair-wise

1:2:3=2:3:1

1:2:3=2:3

2:3:3=2:3

2:3:3=3:1

0

1

1

0

Number equality, permutation

1:2:3*=2:3:1

1:2:3*=2:3

1:2:3*=4:5

1

1

0

Date equality, pair-wise

[1-1-90]:[2-2-90]:[3-3-90]=

[3-3-90]:[2-2-90]:[1-1-90]

[1-1-90]:[2-2-90]:[3-3-90]=

[2-2-90]:[3-3-90]

[2-2-90]:[3-3-90]:[3-3-90]=

[2-2-90]:[3-3-90]

1

1

1

Date equality, permutation

[1-1-90]:[2-2-90]:[3-3-90]*=

[3-3-90]:[2-2-90]:[1-1-90]

[1-1-90]:[2-2-90]:[3-3-90]*=

[2-2-90]:[3-3-90]

[1-1-90]:[2-2-90]:[3-3-90]*=

[4-4-90]:[5-5-90]

1

1

0

Results

These rules can have surprising consequences. For example, it's possible for the expressions A=B and A!=B to both be true at the same time. For example, if A has the value 1:2 and B has the value 1:3. The pair 1 and 1 are compared, and 2 and 3 are compared. Because the first pair are equal, A=B is true. Because the second pair are not equal, A!=B is also true. When working with lists, the inverse of A=B is !(A=B).