Comp210 Lecture # 27    Fall 2002

Generative Recursion continued: Sierpinski Gaskets continued.

Last lecture

  1. we made and drew a base-case Sierpinski gasket.
  2. We made a factory to produce an inductive case gasket from a base case gasket.
  3. We saw how a factory could create multiple lambdas that work in the same closure.

Plan for the day:

  1. Set up the invariant framework for visitors to a Sierpinski gasket.
  2. Write some visitors.
  3. Set up a visitor framework for natural numbers
  4. Write some more visitors.
  5. If we have time, turn around and take a more abstract look at what we've done.

 

The day's code can be found here: lec27.scm

Pre-written code that might be useful: sierpinski.scm <-- this is not a solution. The solution depends on the class discussion. This code is slightly different than last class's code.

 

 

©2002 Stephen Wong