Next: , Previous: , Up: Generic Procedures   [Contents][Index]


4.2 Method Storage

Methods are stored in generic procedures. When a generic procedure is called, it selects a subset of its stored methods (using method-applicable?), and arranges to invoke one or more of the methods as necessary. The following definitions provide the means for adding methods to and removing them from a generic procedure.

Procedure: add-method generic-procedure method

Adds method to generic-procedure. If generic-procedure already has a method with the same specializers as method, then the old method is discarded and method is used in its place.

Procedure: delete-method generic-procedure method

Removes method from generic-procedure. Does nothing if generic-procedure does not contain method.

Procedure: add-methods generic-procedure methods

Adds methods, which must be a list of methods, to generic-procedure. Equivalent to calling add-method on each method in methods.

Procedure: generic-procedure-methods generic-procedure

Returns a list of the methods contained in generic-procedure. The returned list must not be modified.