(
define (get-record file employee-name)
((get 'get-record (get-division file))
file employee-name))
b:Each employee record is also given a tag and that is the the division's name itself.
(define (get-salary employee-record)
((get 'get-salary (get-division employee-record))
employee-record))
c:
(define (find-employee-record files name)
(cond
((null? files) nil)
((null? (get-record (car files) name))
(find-employee-record (cdr files) name))
(else
(get-record (car files) name))))
d:A new division needs to be added with its appropriate procedures into the type-operations table.
No comments:
Post a Comment