This also works which may be more/less convenient: 
    
    
    template createProc*(procName: untyped; body: untyped) =
      proc `auto procName` = body
    
    createProc foo:
      echo "I am in auto_foo"
    
    auto_foo()
    
    
    Run

Note, the first template parameter needs to be untyped.

Reply via email to