added tools and web dirs

This commit is contained in:
Andreas Rumpf 2009-09-15 23:22:22 +02:00
commit 66a7e3d37c
489 changed files with 4593 additions and 9878 deletions

12
tests/titer3.nim Normal file → Executable file
View file

@ -1,7 +1,17 @@
iterator count1_3: int =
yield 1
yield 2
yield 3
for x in count1_3():
write(stdout, $x)
# yield inside an iterator, but not in a loop:
iterator iter1(a: openArray[int]): int =
yield a[0] #ERROR_MSG 'yield' only allowed in a loop of an iterator
yield a[0]
var x = [[1, 2, 3], [4, 5, 6]]
for y in iter1(x[0]): write(stdout, $y)
#OUT 1231