Seen on
[https://nim-by-example.github.io/block](https://nim-by-example.github.io/block)/
Parentheses can be used as an expression, but they do not provide end of
statement inference, so it is necessary to place semicolons yourself. An
interesting and unexpected side effect of this syntax is that Nim is suitable
even for die-hard brace purists!
While possible, it doesn’t mean it’s a good idea. Most Nim code does not
use parentheses in that way, and it would not be seen as idiomatic.
proc square(inSeq: seq[float]): seq[float] = (
result = newSeq[float](len(inSeq));
for i, v in inSeq: (
result[i] = v*v;
)
)
Run