Anonymous recursion: Difference between revisions

Addition of Fōrmulæ language
m (→‎memoization: added a line break for the wording in the REXX section header.)
(Addition of Fōrmulæ language)
Line 757:
# To enable the recursion, a reference to the quotation stays on the stack. This ''q'' impedes access to other things on the stack. This solution must use <code>dip</code> and <code>swap</code> to move ''q'' out of the way. To simplify the code, one might move ''q'' to a local variable, but then the recursion would not be anonymous.
# Factor cannot infer the stack effect of a recursive quotation. The last line must have <code>call( n q -- m )</code> instead of plain <code>call</code>; but <code>call( n q -- m )</code> defers the stack effect check until runtime. So if the quotation has a wrong stack effect, the compiler would miss the error; only a run of <code>fib</code> would detect the error.
 
=={{header|Fōrmulæ}}==
 
<blockquote style="background-color: lightgrey; border: solid thin grey;"><span style="font-size:80%">
Fōrmulæ programs are not textual, visualization/edition of programs is done showing/manipulating structures but not text. Moreover, there can be multiple visual representations of the same program. Even though it is possible to have textual representation &mdash;i.e. XML, JSON&mdash; they are intended for transportation effects more than visualization and edition.
 
The option to show Fōrmulæ programs and their results is showing images. Unfortunately images cannot be uploaded in Rosetta Code.
 
In [http://dictionary.formulae.org/Anonymous_recursion this] page you can see the solution of this task.
</span>
</blockquote>
 
=={{header|Falcon}}==
2,120

edits