Download replace-all-anchovies-with-onions.rkt and write its generalizations replace-all-anchovies and replace-topping, given by the following contracts and purpose statements:
;; replace-all-anchovies-with-onions ;; : Pizza -> Pizza ;; RETURNS: a pizza like the given pizza, but with ;; anchovies in place of each layer of onions ;; replace-all-anchovies : Pizza Topping -> Pizza ;; RETURNS: a pizza like the given pizza, but with ;; all anchovies replaced by the given topping. ;; replace-topping : Pizza Topping Topping -> Pizza ;; RETURNS: a pizza like the given one, but with ;; all instances of the first topping replaced by ;; the second one.
Last modified: Fri Aug 15 10:44:05 Eastern Daylight Time 2014