;; a person is a (make-person string famtree famtree list-of-person) (define-struct person (name mother father kids)) ;; a famtree is either ;; 'unknown, or ;; a person ;; a list-of-person is either ;; empty, or ;; (cons person list-of-person) (define Bper (make-person "Brenda" 'unknown 'unknown empty)) (define Jper (make-person "Judy" Bper 'unknown empty)) (set-person-kids! Bper (list Jper)) ;; add-child-to-mother: person string -> void ;; creates a person with the given name and the given person as its mother ;; EFFECT: adds a child to the kids component of the given person (define (add-child-to-mother mother childname) (set-person-kids! mother (cons (make-person childname mother 'unknown empty) (person-kids mother))))