GNU Info

Info Node: (emacs-lisp-intro.info)Recursion

(emacs-lisp-intro.info)Recursion


Next: Looping exercise Prev: dolist dotimes Up: Loops & Recursion
Enter node , (file) or (file)node

Recursion
=========

   A recursive function contains code that tells the Lisp interpreter to
call a program that runs exactly like itself, but with slightly
different arguments.  The code runs exactly the same because it has the
same name.  However, even though it has the same name, it is not the
same thread of execution.  It is different.  In the jargon, it is a
different `instance'.

   Eventually, if the program is written correctly, the `slightly
different arguments' will become sufficiently different from the first
arguments that the final instance will stop.

Building Robots
Same model, different serial number ...
Recursive Definition Parts
Walk until you stop ...
Recursion with list
Using a list as the test whether to recurse.
Recursive triangle function
Recursion with cond
Recursive Patterns
Often used templates.
No Deferment
Don't store up work ...
No deferment solution

automatically generated by info2www version 1.2.2.9