(define-struct restaurant (name address lod))
(define-struct dish (name main-ingredient price))
(define lod
(list
(make-dish "BNC" "pepper" 15.00)
(make-dish "BBQ" "sauce" 20.00)
(make-dish "BAW" "vanilla" 18.00)
(make-dish "ACA" "tomato" 15.00)
(make-dish "NAM" "onions" 25.00)
(make-dish "PLA" "milk" 34.00)))
(define lod1
(list
(make-dish "AHSH" "carrots" 23.00)
(make-dish "PROA" "garlic" 21.00)
(make-dish "MENE" "eggs" 16.00)
(make-dish "SAYB" "water" 11.00)
(make-dish "WAFA" "chicken" 22.00)
(make-dish "LDAFK" "chocolate" 10.00)))
(define Sky-Dragon (make-restaurant "Sky Dragon" "23 Cutoiut, NY" lod))
(define Tomas (make-restaurant "Tomas" "34 Rossi, CA" lod1))
(define restaurant1 Sky-Dragon)
(define restaurant2 Tomas)
我想知道你将如何编写一个函数来消费一家餐厅并产生餐厅的菜肴总数。就像我去餐厅 1 一样,我得到了 6 道菜。希望我做对了。