Anonymous user
Mutual recursion: Difference between revisions
Updated to work with Nim 1.4: added missing parameter types.
Drkameleon (talk | contribs) No edit summary |
(Updated to work with Nim 1.4: added missing parameter types.) |
||
Line 2,486:
=={{header|Nim}}==
<lang nim>proc m(n: int): int
proc f(n: int): int =
if n == 0: 1
else: n - m(f(n-1))
proc m(n: int): int =
if n == 0: 0
else: n - f(m(n-1))
|