summary refs log tree commit diff stats
path: root/tests/misc/tfib.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-04-09 22:56:18 +0200
committerAndreas Rumpf <rumpf_a@web.de>2014-04-09 22:56:18 +0200
commita690e7b26772a9bb8367acb451a6250449e666ab (patch)
tree9aca0024db9c75970c4dfac10c55f1961c21ca25 /tests/misc/tfib.nim
parentd0f013477b16520eefff69b861d2f26744463880 (diff)
parenta157985e01cbf80383d5e50836072d70678c9de3 (diff)
downloadNim-a690e7b26772a9bb8367acb451a6250449e666ab.tar.gz
Merge pull request #1075 from flaviut/inlinedocs
Add some documentations and code examples in system
Diffstat (limited to 'tests/misc/tfib.nim')
-rw-r--r--tests/misc/tfib.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/misc/tfib.nim b/tests/misc/tfib.nim
new file mode 100644
index 000000000..09a4d5038
--- /dev/null
+++ b/tests/misc/tfib.nim
@@ -0,0 +1,11 @@
+
+iterator fibonacci(): int = 
+  var a = 0
+  var b = 1
+  while true: 
+    yield a
+    var c = b
+    b = a
+    a = a + c
+
+
9:15 +0100 exception tracking should work' href='/ahoang/Nim/commit/tests/reject/teffects1.nim?h=devel&id=6dd2c2d7670b11aa2155f41e1309dad011456140'>6dd2c2d76 ^
e80465dac ^
d7d059a68 ^
69e15ac32 ^
6dd2c2d76 ^

d7d059a68 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19