(defgeneric (f a)) (defmethod (f (a <object>)) (print "apple")) (defmethod (f (a <nurble>)) (print "lemon")) (defgeneric (g b)) (defmethod (g (b <glorp>)) (print "diamond")) (defmethod (g (b <foo>)) (print "sapphire")) (defmethod (g (b <object>)) (print "ruby"))
Assume that the types <nurble> , <glorp> , <foo> and <bar> have been defined such that the following output is generated:
(f (make-glorp)) = "apple" (f (make-foo)) = "lemon" (f (make-bar)) = "lemon" (g (make-bar)) = "ruby"
What are the definitions of the classes <nurble> , <glorp>
, <foo> and <bar> that must have been defined to
obtain this output?