Repeat - Function SummarySummary:Evaluates a block a number of times or over a series. Usage:repeat word value body Arguments:word - Word to set each time (must be: word) value - Maximum number or series to traverse (must be: integer series) body - Block to evaluate each time (must be: block) Description:If the value is an integer, the word is used to keep track of the current loop count, which begins at one and continues up to and including the integer value given. If the value is a series, then the word holds the first value of each element of the series (see FOREACH). Returns the value of the final evaluation. The BREAK function can be used to stop the loop at any time (but no value is returned). The word is local to the block.
Related:for - Repeats a block over a range of values. User Comments:-From: lmecir_mbox.vol.cz 2-Dec-2000/4:05:28-8:00: Warning: Repeat modifies its Body argument. If you need to reuse the Body (in the case of recursive functions, e.g.), use it in combination with Copy/deep as in:
-From: allen_rebolforces.com 15-Dec-2000/21:44:25-8:00: REPEAT operates faster than FOR, so use REPEAT in place of FOR wherever you can.
| ||||
|