Template:Simple recursion/doc

From 'City of Adelaide' History and Genealogy Site
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>]] &asymp; {{#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