(setf (get 'fido 'birth-year) '((value 2002))) (setf (get 'fido 'supers) '(dog)) (setf (get 'dog 'barks) '((value t))) (setf (get 'dog 'supers) '(mammal)) (setf (get 'mammal 'warm-blooded) '((value t))) (setf (get 'mammal 'legs) '((value 4))) (setf (get 'mammal 'age) '((if-needed agefn))) (defun agefn (frame) (- (current-year) (getslot frame 'birth-year))) > (getslot 'fido 'birth-year) ; stored 2002 > (getslot 'fido 'barks) ; inherited from dog T > (getslot 'fido 'legs) ; inherited from mammal 4 > (getslot 'fido 'age) ; inherited, if-needed 3
Contents    Page-10    Prev    Next    Page+10    Index