Repeat
| Name |
Mandatory |
Description |
Default |
Type |
⬅️ Input |
|
The input will be passed to both the action and the Until condition if used. |
|
Any |
Output ➡️ |
|
The output of this shard will be its input. |
|
Any |
Action |
No |
The shards to repeat. |
none |
Shard[Shard] |
Times |
No |
How many times we should repeat the action. |
none |
IntVar(Int)None |
Forever |
No |
If we should repeat the action forever. |
false |
Bool |
Until |
No |
Optional shards to use as predicate to continue repeating until it's true |
none |
Shard[Shard]None |
Repeat an action a given number of times or until the 'Until' parameter returns true.
Examples
| 0 >= n
Repeat({
n | Log("Counting")
Math.Inc(n)
}
Forever: true
Until: {n | IsMore(9)}
)
|
| Repeat({
Msg("Hello")
}
Times: 5)
|