inline fun repeat(times: Int, action: (Int) -> Unit)
주어진 함수 action 을 times 만큼 반복한다.
// greets three times
repeat(3) {
println("Hello")
}
// greets with an index
repeat(3) { index ->
println("Hello with index $index")
}
repeat(0) {
error("We should not get here!")
}