A generic procedure takes an object and extracts an instance variable value from the object. Each generic procedure works on instances of a single class (including instances of classes derived from that class) or interface (i.e., instances of classes that implement the interface) and always extracts the value for the same instance variable.
Generic procedures are provided for efficiency. To extract the value of the same instance variable from multiple objects, it is usually more efficient to create a single generic procedure and use it each time than to use ivar each time.
The make-generic/proc procedure creates a generic procedure:
If the class c or its superclasses does not contain an instance variable with the (external) name s, the exn:object:class-ivar exception is raised by make-generic/proc.
If the interface i does not contain an instance variable with the name s, the exn:object:interface-ivar exception is raised by make-generic/proc.
If a generic procedure is applied to an object that is not an instance of the generic procedure's class or interface, the exn:obj:generic exception is raised.
The make-generic form expands to an application to
make-generic/proc:
(make-generic ci name)
(make-generic/proc ci (quote name))