Ah yes, I see. Thanks!
I bet he only forgot about that.
I usually limit myself of not using parenthesis when the proc only need one
argument, while when writing anonymous proc in parenthesis entirely e.g.
(proc), thankfully it didn't parsed as a single element tuple, (or did it?
:/ )
https://nim-lang.org/docs/manual.html#procedures-anonymous-procs
@Stefan_Salewski, to further clarify, you could replace that code with the
equivalent:
proc onDestroy(p: pointer) =
let x = cast[var T](p)
`=destroy`(x.le)
`=destroy`(x.ri)
dealloc(p)
proc `=destroy`(x: var T) =
lazyDestroy(cast[pointer](x),
It's an anonymous proc.
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