When assigning functions to a variable I strongly suggest you to force the 
nimcall or closure convention like this:
    
    
    var fn0 = proc (x: int): void {.nimcall.} = echo(x)
    
    
    Run

Similar to 
[https://github.com/nim-lang/Nim/issues/2614](https://github.com/nim-lang/Nim/issues/2614)

I agree, that's a big weakness of Nim higher order functions.

Reply via email to