|
|
|
|
|
by kazinator
4061 days ago
|
|
You might as well use the POSIX shell to write your code: cat <<END
$(for x in A B C; do
echo "proc $x() = echo \"$x\"";
done)
proc execute(order: seq[int], callbacks: seq[proc]) =
for i in items(order):
callbacks[i]()
execute(@[0,0,1,2,1,2], @[A, B, C])
END
|
|