See 
[sugar.capture](https://nim-lang.org/docs/sugar.html#capture.m%2Cvarargs%5Btyped%5D%2Cuntyped).
 (It seems to be broken in the Nim version I'm using, but you can manually do 
what it does — wrap the closure in another closure that takes the values as 
parameters and immediately pass them to it.)

Reply via email to