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

[REBOL] Re: cycling

From: jeff::rebol::net at: 6-Jul-2001 6:12

> Given a set of M "index" values, what's the simplest way to > cycle through them, both forward and backward?
A set of M 'index' values -- you mean a block? b: copy [1 2 3 ... m] ;-- or b: copy [0 1 2 3 ... (m - 1)] forever [ forall b [print index? b] until [print index? b head? b: back b] ] -jeff