Exercise 2.84. Using the raise operation of exercise 2.83, modify the apply-generic procedure so that it coerces its arguments to have the same type by the method of successive raising, as discussed in this section. You will need to devise a way to test which of two types is higher in the tower. Do this in a manner that is ``compatible'' with the rest of the system and will not lead to problems in adding new levels to the tower. ———————————————————————————————————————————————————————————————————————— If possible, raise a to the type of b and return the raised a, or false. (define (raise-to-type-of a b) (cond ((eq? (type-tag a) (type-tag b)) a) ((get 'raise (type-tag a)) (raise-to-type-of ((get 'raise (type-tag a)) a) b)) (else false))) (define (apply-generic op . args) (let ((type-tags (map type-tag args))) (let ((proc (get op type-tags))) (if proc (apply proc (map contents args)) (if (= (length args) 2) (let ((raised-a (raise-to-type-of a b))) (if (raised-a) (apply-generic raised-a b) (let ((raised-b (raise-to-type-of b a))) (if (raised-b) (apply-generic a raised-b) (error "No method for these types"))))))))))