repeat

inline fun repeat(times: Int, action: (Int) -> Unit)(source)

Calls action with each index from zero until times, or not at all for non-positive counts.