Skip to content

Instantly share code, notes, and snippets.

@bucho666
Created October 4, 2019 06:45
Show Gist options
  • Save bucho666/011fa1efa557cbfb601c44478c7608e4 to your computer and use it in GitHub Desktop.
Save bucho666/011fa1efa557cbfb601c44478c7608e4 to your computer and use it in GitHub Desktop.
Nimで関数の配列を実行する
proc command_pattern() =
var commands: seq[proc()]
commands.insert(proc() = echo "hello")
commands.insert(proc() = echo "world")
for c in commands: c()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment