Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defclass animal ()
- ((base-element :initform 'carbon :allocation :class :reader animal-base-element)))
- (defparameter *a1* (make-instance 'animal))
- (animal-base-element *a1*) ; --> carbon
- (defgeneric base-element (thing))
- (defmethod base-element ((class (eql (find-class 'animal))))
- (animal-base-element (c2mop:class-prototype class)))
- (base-element (find-class 'animal)) ; --> carbon
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement