Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
13
Task/Repeat/Chapel/repeat-1.chapel
Normal file
13
Task/Repeat/Chapel/repeat-1.chapel
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
config const n = 5;
|
||||
|
||||
proc example()
|
||||
{
|
||||
writeln("example");
|
||||
}
|
||||
|
||||
proc repeat(func, n)
|
||||
{
|
||||
for i in 0..#n do func();
|
||||
}
|
||||
|
||||
repeat(example, n);
|
||||
13
Task/Repeat/Chapel/repeat-2.chapel
Normal file
13
Task/Repeat/Chapel/repeat-2.chapel
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
config const n = 5;
|
||||
|
||||
proc example()
|
||||
{
|
||||
writeln("example");
|
||||
}
|
||||
|
||||
proc repeat(func : proc(), n : uint)
|
||||
{
|
||||
for i in 0..#n do func();
|
||||
}
|
||||
|
||||
repeat(example, n);
|
||||
13
Task/Repeat/Chapel/repeat-3.chapel
Normal file
13
Task/Repeat/Chapel/repeat-3.chapel
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
config const n = 5;
|
||||
|
||||
proc example(x : uint)
|
||||
{
|
||||
writeln("example ", x);
|
||||
}
|
||||
|
||||
proc repeat(func : proc(x : uint), n : uint)
|
||||
{
|
||||
for i in 0..#n do func(i);
|
||||
}
|
||||
|
||||
repeat(example, n);
|
||||
Loading…
Add table
Add a link
Reference in a new issue