Package: closer-mop

## Generic Function compute-discriminating-function

### Lambda List

compute-discriminating-function (

**gf**)### Arguments

The generic-function argument is a generic function metaobject.

### Return Value

The value returned by this generic function is a function.

### Details

This generic function is called to determine the discriminating
function for a generic function. When a generic function is called, the

To determine the ordered set of applicable methods, the discriminating function first calls compute-applicable-methods-using-classes. If compute-applicable-methods-using-classes returns a second value of false, the discriminating function then calls compute-applicable-methods.

When compute-applicable-methods-using-classes returns a second value of true, the discriminating function is permitted to memoize the first returned value as follows. The discriminating function may reuse the list of applicable methods without calling compute-applicable-methods-using-classes again provided that:

The generic function compute-discriminating-function is called, and its result installed, by add-method, remove-method, initialize-instance and reinitialize-instance.

*installed*discriminating function is called with the full set of arguments received by the generic function, and must implement the behavior of calling the generic function: determining the ordered set of applicable methods, determining the effective method, and running the effective method.To determine the ordered set of applicable methods, the discriminating function first calls compute-applicable-methods-using-classes. If compute-applicable-methods-using-classes returns a second value of false, the discriminating function then calls compute-applicable-methods.

When compute-applicable-methods-using-classes returns a second value of true, the discriminating function is permitted to memoize the first returned value as follows. The discriminating function may reuse the list of applicable methods without calling compute-applicable-methods-using-classes again provided that:

- the generic function is being called again with required arguments which are instances of the same classes,
- the generic function has not been reinitialized,
- no method has been added to or removed from the generic function,
- for all the specializers of all the generic function's methods which are classes, their class precedence lists have not changed and
- for any such memoized value, the class precedence list of the class of each of the required arguments has not changed.

The generic function compute-discriminating-function is called, and its result installed, by add-method, remove-method, initialize-instance and reinitialize-instance.

### Methods

compute-discriminating-function (generic-function standard-generic-function)

No behavior is specified for this method beyond that specified for the
generic function.

This method can be overridden.

This method can be overridden.