KNOW:
BE ABLE TO:
Sample Exam Question:
Consider the following definition of family trees used in a medical database:
;; An ftree is either ;; 'unknown, or ;; (make-person string symbol ftree ftree) (define-struct person (name bloodtype father mother)) ;; where bloodtype is one of 'A, 'B, 'AB, or 'OWrite a function count-type that consumes a bloodtype and a family tree and produces the number of people in the family tree who have the given bloodtype.
;; count-type: symbol ftree -> number ;; consumes a bloodtype and a family tree and produces the number of people ;; with that bloodtype