Yesterday I read

[https://nim-lang.org/araq/destructors.html](https://nim-lang.org/araq/destructors.html)

Was some fun, but I still have no idea what the second line in
    
    
    proc `=destroy`(x: var T) =
      lazyDestroy cast[pointer](x), proc (p: pointer) =
        let x = cast[var T](p)
        `=destroy`(x.le)
        `=destroy`(x.ri)
        dealloc(p)
    
    
    Run

really is. Looks like a proc call without parenthesis, but with a equal sign at 
line end? No idea currently.

Well, maybe a typo, as there is at least one typo in that document:
    
    
    proc add*(s: var string; c: char) =
      if s.len >= s.cap: resize(s)
      s.data[s.len] = c
    
    
    Run

Final inc(s.len) is missing.

Reply via email to