Not possible, you'll need to pass the captured variables explicitly into the 'lambda' via some sort of context parameter.
And considering the memory management magic that would need to be implemented by the compiler for 'painless capture' that's probably a good thing (e.g. there would almost certainly be a hidden heap allocation required which is a big no-no in Zig).
Not possible, you'll need to pass the captured variables explicitly into the 'lambda' via some sort of context parameter.
And considering the memory management magic that would need to be implemented by the compiler for 'painless capture' that's probably a good thing (e.g. there would almost certainly be a hidden heap allocation required which is a big no-no in Zig).