Hi,

> Why is this an issue:
    
    
    proc doIt(x: (string, proc(): void)) =
      echo x[0]
    
    doIt(("xx", proc(): void = echo "aa"))
    
    
    Run
    
    
    Hint: used config file 
'/home/steven/.choosenim/toolchains/nim-0.19.0/config/nim.cfg' [Conf]
    Hint: system [Processing]
    Hint: t [Processing]
    t.nim(5, 5) Error: type mismatch: got <tuple of (string, proc (){.gcsafe, 
locks: 0.})>
    but expected one of:
    proc doIt(x: (string, proc (): void))
    
    expression: doIt(("xx", proc (): void = echo ["aa"]))
    
    
    Run

Is there a sane way in nim to do lambdas?

Reply via email to