the problem is you need wrap `discard` in paranthes
    
    
    import std/sugar
    
    proc on_click(fn: (string) -> void): void =
      discard
    
    on_click((e: string) => (discard))
    
    
    Run

but o found more annoying that you need specify auto type
    
    
    import std/sugar
    
    proc on_click(fn: (string) -> void): void =
      discard
    
    on_click((e) => (discard)) # this wont work
    
    
    Run

Reply via email to