(define-struct animal (name species age breakfast-hour dinner-hour))
(define-struct attendant (name a1 a2 a3))
(define attendant1 (make-attendant "Dave" 'gorillas 'bats 'mandrills ))
(define attendant2 (make-attendant "John" 'crocodiles 'ocelots 'capybara ))
(define attendant3 (make-attendant "Joe" 'pottos 'tapirs 'vultures ))
How would I add data definitions to these? All this currently gives me is “(E.g. ;; An animal is…)”.
First you define the structures:
Then, the animals (because you need to create these before assigning them to attendants):
And finally, you create the attendants, giving each guy or gal their corresponding animals:
Notice that for creating the attendants, we must reference one of the previously defined animals.