Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Mutual-recursion/Ceylon/mutual-recursion.ceylon
Normal file
14
Task/Mutual-recursion/Ceylon/mutual-recursion.ceylon
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Integer f(Integer n)
|
||||
=> if (n > 0)
|
||||
then n - m(f(n-1))
|
||||
else 1;
|
||||
|
||||
Integer m(Integer n)
|
||||
=> if (n > 0)
|
||||
then n - f(m(n-1))
|
||||
else 0;
|
||||
|
||||
shared void run() {
|
||||
printAll((0:20).map(f));
|
||||
printAll((0:20).map(m));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue