repeat
Repeats content N times. This is shorthand for .foreach {..N}.
The current index (starting from 1) can be accessed via the lambda argument.
.repeat {5}
index:
Iteration number .indexContent copied to clipboard
In implicit form:
.repeat {5}
Iteration number .1Content copied to clipboard
As with foreach, the output is a mapping from [1, N] to another collection of values. See foreach's documentation for further details.
Return
a collection that contains the output of each iteration
Parameters
times
number of times to repeat the content
body
- Likely a body argument
the output of each iteration. Accepts 1 parameter (the current repetition index, starting from 1).