Golden ratio/Convergence: Difference between revisions

Content added Content deleted
(→‎{{header|M4}}: Note about recursion.)
(→‎{{header|M4}}: More detail.)
Line 726: Line 726:
M4 is a macro-preprocessor, not a general-purpose programming language. That we can do this much without a lot of trouble is interesting.
M4 is a macro-preprocessor, not a general-purpose programming language. That we can do this much without a lot of trouble is interesting.


M4 has recursion but not true loops. It is possible to write macros that look like loops, however. That is not done here.
M4 has recursion but not true loops. It is possible to write macros that look like loops, but that is not done here. The "_iterate" macro (called "_$0" within the body of "iterate") is recursive.


<syntaxhighlight lang="m4">
<syntaxhighlight lang="m4">