7 lines
102 B
Swift
7 lines
102 B
Swift
func repeat(n: Int, f: () -> ()) {
|
|
for _ in 0..<n {
|
|
f()
|
|
}
|
|
}
|
|
|
|
repeat(4) { println("Example") }
|