Case Example 1
(defun accept-bid-1 ()
(format t "How many dollars are you offering ?")
(let* ((offer (read))
(counter-offer (+ offer 5))
(field-width
(1+ (length (format nil "~d" counter-offer)))))
(format t "Would you consider raising that to ~v,'$d ?"
field-width
counter-offer)
(case (read)
((y yes t ok) counter-offer)
(otherwise offer))))
Previous slide
Next slide
Back to first slide
View graphic version