mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-20 16:01:29 +00:00
Update tut1.txt
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user