10 REM A WHILE or UNTIL on the LOOP composes with DO EACH: it is checked
20 REM after each trip through the body, with the loop variable still
30 REM holding that trip's value. Stopping abandons the generator cleanly.
40 GEN COUNTUP(N#)
50     FOR I# = 1 TO N#
60         EMIT I#
70     NEXT I#
80 END GEN
90 DO EACH V# IN COUNTUP(10)
100     PRINT V#
110 LOOP UNTIL V# = 3
120 DO EACH W# IN COUNTUP(4)
130     PRINT W# * 10
140 LOOP WHILE W# < 3
150 PRINT "DONE"
