Re-reading your message, I think I didn't actually answer your question; you weren't asking "How can I make this work?" but more "Why does this approach fail?". Sorry!
At the moment I don't see why it isn't working either, but I experimented a bit more and got it to work using the => syntax for anonymous procs from the sugar module ([https://nim-lang.org/docs/sugar.html)](https://nim-lang.org/docs/sugar.html\)): [https://play.nim-lang.org/#ix=26Dx](https://play.nim-lang.org/#ix=26Dx)
