**Krux02**: I found the following document earlier today that explains some of the internals: [here](http://forum.nim-lang.org///nim-lang.org/docs/intern.html#code-generation-for-closures)
I also made [this](https://gist.github.com/komerdoor/70d9c25820952624cf797890a18f9cd5) several months ago to test out functional programming in Nim. Had been away from Nim for a while so I am not sure if there are better libraries doing that now. I could not get it to work without the `pipe` function.
