diff options
author | Alexander <achasch@gmail.com> | 2015-06-16 15:58:21 +0300 |
---|---|---|
committer | Alexander <achasch@gmail.com> | 2015-06-16 15:58:21 +0300 |
commit | abe1051374c2213ab28a8e7814ef3cc11d044e77 (patch) | |
tree | 9416f1233d29ddcbc9aa8ebe343cf0d0e59d46ec /doc | |
parent | 3772944fdbdbf73b794ddf95a4ff0e110abb00d0 (diff) | |
download | Nim-abe1051374c2213ab28a8e7814ef3cc11d044e77.tar.gz |
Update tut1.txt
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tut1.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/tut1.txt b/doc/tut1.txt index 1fa495054..6f10e7cbb 100644 --- a/doc/tut1.txt +++ b/doc/tut1.txt @@ -758,9 +758,13 @@ However, this cannot be done for mutually recursive procedures: proc even(n: int): bool proc odd(n: int): bool = + if n == 0: + true n == 1 or even(n-1) proc even(n: int): bool = + if n == 1: + true n == 0 or odd(n-1) Here ``odd`` depends on ``even`` and vice versa. Thus ``even`` needs to be |