### Range expressions

The expression E1 to E2 returns a sequence of integers. For example, 1 to 5 returns the sequence 1, 2, 3, 4, 5. This is useful in for expressions, for example the first five nodes of a node sequence can be processed by writing for $i in 1 to 5 return (//x) $i. Another example:

    (1+1 to 10)

result:

1. xs:integer: 2

2. xs:integer: 3

3. xs:integer: 4

4. xs:integer: 5

5. xs:integer: 6

6. xs:integer: 7

7. xs:integer: 8

8. xs:integer: 9

9. xs:integer: 10