Lecture 22 Objectives


At the end of today's class you should

KNOW:

BE ABLE TO:

Sample Exam Question:

An online bookstore uses the following data definition and variable to track customers' orders:

;; an order is a (make-order string list-of-string symbol)
(define-struct order (name titles status))

;; orderlist:  list-of-order
;; stores the orders that customers have placed

;; where status is one of 'placed, 'paid, or 'shipped
Write a function change-status that consumes an order and a symbol and changes the order's status to the given symbol. As part of your answer, fill in the EFFECT statement in the documentation provided below.
;; change-status: order symbol -> void
;; changes status of given order to given symbol
;; EFFECT: