Template:Simple recursion/doc
Jump to navigation
Jump to search
{{#invoke:Message box|mbox}}
Usage
{{{Simple recursion|left repeated text|non-repeated text|right repeated text|depth}}
Example
"{{Simple recursion|a|b|c|4}}"
gives "{{#invoke:String|rep|a|4}}b{{#invoke:String|rep|c|4}}"
"{{Simple recursion|f( |f(x) + g|) + g|7}}"
gives "{{#invoke:String|rep|f( |7}}f(x) + g{{#invoke:String|rep|) + g|7}}"
"{{math|[[Golden ratio|<var>φ</var>]] ≈ {{#expr: {{Simple recursion|(|1|)^-1+1|35}}}}}}"
gives "φ ≈ Expression error: Unrecognised punctuation character "{"." (iterative method, finding the largest of the solutions to <math>\varphi^{-1} = \varphi - 1</math>)
See also
- Template:Loop (backlinks edit)
- Template:Substloop (backlinks edit)
- Template:For loop (backlinks edit)
- Template:Repeat (backlinks edit)