Builtin
loop
loop{from:int, size:int, to:int, seq:int}
A relation generator.
Yields a sequence of seqs depending on the arguments given.
If size is provided it is used to select the length of the sequence.
If from is provided it is used to select the staring seq otherwise 0 is used.
If to is provided it is used to select the ending seq.
Examples
size
loop(size:=3)
from and size
loop(size:=3, from:=10)
from and to
loop(from:=1, to:=3)
to and size
loop(size:=3, to:=4)
to
loop(to:=2)
nested loop
loop(size:=3){i:=seq} * loop(size:=3){j:=seq}
| i | j |
| 0 | 0 |
| 0 | 1 |
| 0 | 2 |
| 1 | 0 |
| 1 | 1 |
| 1 | 2 |
| 2 | 0 |
| 2 | 1 |
| 2 | 2 |