Guided Practice 6.1: Pizzas as Structures
There are two questions in this Guided Practice.
- Write the three pizza functions from module 5
replace-all-anchovies, and replace-topping)
using the data definition in this lesson.
- You've been working at the pizza shop for a few months now, and
you've written hundreds of functions manipulating pizzas. Your boss
has now come under the spell of an evil wizard, who has convinced him
that his business will be much better if he changes the data
definition for pizza to the following:
;; A Topping is a String.
;; A Pizza is either
;; -- the string "kaphlooey"
;; -- (make-shazam Pizza Topping)
;; "kaphlooey" represents a pizza with no toppings
;; (make-shazam p t) represents the pizza p with topping t added on top.
What do you do to satisfy your insane boss?
Last modified: Fri Sep 4 11:33:08 Eastern Daylight Time 2015