examples from the talk part of test suite
This commit is contained in:
parent
a0b82db402
commit
2f0671eb79
9 changed files with 153 additions and 3 deletions
12
examples/talk/lazyeval.nim
Normal file
12
examples/talk/lazyeval.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
const
|
||||
debug = true
|
||||
|
||||
template log(msg: string) =
|
||||
if debug:
|
||||
echo msg
|
||||
var
|
||||
x = 1
|
||||
y = 2
|
||||
|
||||
log("x: " & $x & ", y: " & $y)
|
||||
Loading…
Add table
Add a link
Reference in a new issue