Jump to content

Mutual recursion: Difference between revisions

Add APL
(Add Modula-2)
(Add APL)
Line 335:
 
end.</lang>
 
=={{header|APL}}==
{{works with|Dyalog APL}}
<lang apl>f ← {⍵=0:1 ⋄ ⍵-m∇⍵-1}
m ← {⍵=0:0 ⋄ ⍵-f∇⍵-1}
⍉'nFM'⍪↑(⊢,f,m)¨0,⍳20</lang>
{{out}}
<pre>n 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
F 1 1 2 2 3 3 4 5 5 6 6 7 8 8 9 9 10 11 11 12 13
M 0 0 1 2 2 3 4 4 5 6 6 7 7 8 9 9 10 11 11 12 12</pre>
 
=={{header|AppleScript}}==
2,115

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.