repeat

.repeat times:{Int} body:{Lambda} -> Iterable<Any>

Repeats content N times. The current index (starting from 1) can be accessed via the lambda argument. This is shorthand for foreach {..N} {body}.

Return

a collection that contains the output of each iteration

Parameters

times

amount of times to repeat the content

body

content, output of each iteration. Accepts 1 parameter (the current element).