Mutual recursion: Difference between revisions
Content deleted Content added
Drkameleon (talk | contribs) No edit summary |
No edit summary |
||
Line 1,483: | Line 1,483: | ||
M : 0 0 1 2 2 3 4 4 5 6 6 7 7 8 9 9 10 11 11 12 12 13 14 14 15 |
M : 0 0 1 2 2 3 4 4 5 6 6 7 7 8 9 9 10 11 11 12 12 13 14 14 15 |
||
</pre> |
</pre> |
||
=={{header|Lambdatalk}}== |
|||
<lang scheme> |
|||
{def F {lambda {:n} {if {= :n 0} then 1 else {- :n {M {F {- :n 1}}}} }}} |
|||
{def M {lambda {:n} {if {= :n 0} then 0 else {- :n {F {M {- :n 1}}}} }}} |
|||
{map F {serie 0 19}} |
|||
-> 1 1 2 2 3 3 4 5 5 6 6 7 8 8 9 9 10 11 11 12 |
|||
{map M {serie 0 19}} |
|||
-> 0 0 1 2 2 3 4 4 5 6 6 7 7 8 9 9 10 11 11 12 |
|||
</lang> |
|||
=={{header|Liberty BASIC}}== |
=={{header|Liberty BASIC}}== |