repeat

infix inline fun Int.repeat(block: (Int) -> Unit)

Repeats block this many times, passing the current iteration index.

Infix extension on Int.

Parameters

block

the action to invoke with each iteration index