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.
©2003 Stephen Wong