Mutual recursion: Difference between revisions

m
→‎with memoization, specific entry: added a comment. -- ~~~~
m (→‎with memoization: added a comment. -- ~~~~)
m (→‎with memoization, specific entry: added a comment. -- ~~~~)
Line 1,679:
if lim>0 then say 'Fs=' Fs; else say 'F('aLim")=" word(Fs,aLim+1)
if lim>0 then say 'Ms=' Ms; else say 'M('aLim")=" word(Ms,aLim+1)
exit /*stick a fork in it, we're done.*/
exit
/*─────────────────────────────────────F, M, Jw subroutines────────────*/
F: procedure expose hm. hf.; arg n; if hf.n=='' then hf.n=n-M(F(n-1)); return hf.n