In reply to @kiloneie "Maybe workout, lunch and": You seem to have a misunderstanding of how implicit return works. Expressions in Nim can return a value, for example `4 + 2` "returns" 6 the same way `myProc(value)` might return something. Statements on the other hand doesn't return anything, e.g. `var x = 4 + 2` or `echo "hello world"`. Some parts of Nim which looks the same can be either a statement or an expression. Nim is also strict about handling returned values, and you will get errors if you just have random value-returning expression in your code where the value isn't assigned to anything or explicitly `discard`-ed. In comes implicit return. Many parts of Nim can become expressions and return a value. For example `if 10 > myVar: echo myVar` is an if-statement, since it doesn't return anything, it just has side-effects. While `if 10 > myVar: myvar else: 0` is an if-expression since it either returns `myvar` or `0`. The rule is that a statement becomes an expression if the last thing in each branch is an expression (and they all have the same type) or causes control flow to break. This means that such an expression will always return a value of the same type as long as the code continues to execute past it. This holds true for if/when, case, try/except, blocks, etc. and allows all sorts of fun (see my article on the topic for some examples). Now back to your code. Templates are a bit special in Nim in that they look like a procedure but actually just do code expansion. So you can't `return` anything from them, or assign to `result` like you would in a procedure (you actually can but that means returning from the caller of the template or assigning to the callers result). A template with a "return value" simply tells Nim that the block of code in the template will evaluate to that type.