RosettaCodeData/Task/Repeat/Chapel/repeat-1.chpl
2026-04-30 12:34:36 -04:00

13 lines
141 B
Chapel

config const n = 5;
proc example()
{
writeln("example");
}
proc repeat(func, n)
{
for i in 0..#n do func();
}
repeat(example, n);