var g: proc(x: int): int g = proc (x: int): int = g(x) Run
But it's unknown if a closure can capture itself. Or maybe let g = block: proc f(x: int): int = f(x) f Run Also, I think it cannot be done with `auto`, which introduces an implicit generic parameter and thus not suitable for variable type.