Syntax:
add-method generic-function method => generic-function
Arguments and values:
generic-function -- A generic function metaobject.
method -- A method metaobject.
Description:
This generic function associates an unattached method with a generic function.
An error is signaled if the lambda list of the method is not congruent with the lambda list of the generic function. An error is also signaled if the method is already associated with some other generic function.
If the given method agrees with an existing method of the generic function on parameter specializers and qualifiers, the existing method is removed by calling remove-method before the new method is added. See the section of the CLOS Specification called ``Agreement on Parameter Specializers and Qualifiers'' for a definition of agreement in this context.
Associating the method with the generic function then proceeds in four steps:
The generic function add-method can be called by the user or the implementation.
Methods:
add-method (generic-function standard-generic-function) (method standard-method) |