10 REM Nested FOR EACH/DO EACH over the same GEN with different arguments,
20 REM in every combination of the two loop shapes.
30 GEN COUNTUP(N#)
40     FOR I# = 1 TO N#
50         EMIT I#
60     NEXT I#
70 END GEN
80 FOR EACH A# IN COUNTUP(2)
90     FOR EACH B# IN COUNTUP(3)
100         PRINT A# * 10 + B#
110     NEXT B#
120 NEXT A#
130 DO EACH C# IN COUNTUP(2)
140     DO EACH D# IN COUNTUP(2)
150         PRINT C# * 100 + D#
160     LOOP
170 LOOP
180 FOR EACH E# IN COUNTUP(2)
190     DO EACH F# IN COUNTUP(2)
200         PRINT E# * 1000 + F#
210     LOOP
220 NEXT E#
