Now that we have shown how expressions can be composed, we can begin the tour of all JSONiq expressions. First, we introduce the most basic operations.
8.1. Construction of Sequences
8.1.1. Comma Operator
The comma allows you to concatenate two sequences, or even single items. This operator has the lowest precedence of all, so do not forget the parentheses if you would like to change this.
Also, the comma operator is associative -- in particular, sequences do not nest. You need to use arrays in order to nest.
With the binary operator "to", you can generate larger sequences with just two integer operands.
If the left operand is greater than the right operand, an empty sequence is returned.
If an operand evaluates to something else than a single integer, an error is raised. There is one exception with the empty sequence, which behaves in a particular way for most operations (see below).