![]() | This example is based on the class and method developed in method. |
Gamma> y = Square;
(defclass Square RegPolygon [(area . (defun Square.area (self) (sqr (@ self length))))][length (sides . 4)])
Gamma> class_name(y);
Square
Gamma> box = new(Square);
{Square (length) (sides . 4)}
Gamma> class_name(box);
Square
Gamma>