Great! I'll probably use the closure method only because I have not upgraded 
Nim in a long time and my version doesn't support std/tasks (2022?). This works 
for now, if more verbose:
    
    
    type MyTask = proc () {.closure.}
    
    proc hello(a: int) = echo a
    proc other(s: string) = echo s
    proc simp() = echo "none"
    
    proc helloTask(): MyTask =
      (proc () = hello(3))
    proc otherTask(): MyTask =
      (proc () = other("abc"))
    proc simpTask(): MyTask =
      (proc () = simp())
    
    for p in @[helloTask(), otherTask(), simpTask()]:
      p()
    
    
    Run

Reply via email to