|
Comp210: Principles of Computing and Programming
Fall 2004 -- Lecture
#27
|
Generative Recursion continued: Sierpinski Gaskets continued.
Last lecture
- we made and drew a base-case Sierpinski gasket.
- We made a factory to produce an inductive case gasket from a base case
gasket.
- We saw how a factory could create multiple lambdas that work in the same
closure.
Plan for the day:
- Set up the invariant framework for visitors to a Sierpinski gasket.
- Write some visitors.
- Set up a visitor framework for natural numbers
- Write some more visitors.
- 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.
Last Revised
Tuesday, 24-Aug-2004 13:49:02 CDT
©2004 Stephen Wong and Dung Nguyen