(defparameter *body* (klass (*object*) area $height volume)) (defparameter *tube* (klass (*body*) $radius)) (defmeth init *body* (u) (setf ($height u) 1)) (defmeth area *tube* (u) (* pi (expt ($radius u) 2))) (defmeth volume *body* (u) (* ($height u) (area u))) (defmeth init *tube* (u) (next u) (setf ($radius u) 10)) (defun !tube () (let ((tub (inst *tube*))) (format t "~a~%" (volume tub)) (with-zlots tub #'(lambda (prop value) (if (dollarp prop) (format t "~a = ~a~%" prop value)))) (with-vars tub #'(lambda (prop value) (format t "~a = ~a~%" prop value)))))