CS51 - Fall 2009 - Lecture 21

  • (structural) recursion
  • class has an instance variable which implement same interface as the class itself.

  • Examples include everything so far, including:
  • SimpleRecScribbler
  • ChainReaction
  • these last two also illustrate a data structure called a linked lists
  • idea of ``current item'' and ``rest of list''