Rebol Programming/repeat

From Wikibooks, open books for an open world
Jump to navigation Jump to search

USAGE:[edit | edit source]

REPEAT 'word value body 

DESCRIPTION:[edit | edit source]

Evaluates a block a number of times or over a series.

REPEAT is a native value.

ARGUMENTS[edit | edit source]

  • word -- Word to set each time (Type: word)
  • value -- Maximum number or series to traverse (Type: integer series)
  • body -- Block to evaluate each time (Type: block)

SOURCE CODE[edit | edit source]

repeat: native[
    {Evaluates a block a number of times or over a series.} 
    'word [word!] "Word to set each time" 
    value [integer! series!] "Maximum number or series to traverse" 
    body [block!] "Block to evaluate each time"
]