wiki:BigIdeas/Recursion

Recursion

  • recursion re-binds argument symbols within a new scope - each function call is an independent closure over its actual argument values or an implicit scope (a frame of environment).
  • the accumulator pattern (parametrizing with an additional argument - an accumulator) makes recursive calls tail recursive (TCO - optimization by a compiler).

See also Iteration

Last modified 15 months ago Last modified on Nov 17, 2018, 8:03:36 AM
Note: See TracWiki for help on using the wiki.