Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Monday Puzzle

From: larry:ecotope at: 23-Jul-2001 20:55

Hi all, Here is a clarification of the behavior of the block y:
>> loop 100 [prin [y/1 " "] y: second y] print ""
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 And, in general, the loop can be iterated any number of times and will produce a list of the digits 0-9, repeated in order, of length equal to the number iterations (i.e., y is a ring). -Larry