Misc fixes
This commit is contained in:
parent
9bebbe079b
commit
a5fdbc898e
9 changed files with 62 additions and 29 deletions
|
|
@ -88,7 +88,7 @@ Closure iterators hold on to their state and can be resumed at any time. The `fi
|
|||
|
||||
``` nimrod
|
||||
proc countTo(n: int): iterator(): int =
|
||||
return iterator (): int =
|
||||
return iterator(): int =
|
||||
var i = 0
|
||||
while i <= n:
|
||||
yield i
|
||||
|
|
@ -100,7 +100,7 @@ echo countTo20()
|
|||
|
||||
var output = ""
|
||||
while not finished(countTo20):
|
||||
output.add($countTo20())
|
||||
output.add($countTo20() & " ")
|
||||
echo output
|
||||
|
||||
output = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue