5.5.1 Step 1: Find the applicable methods
Start with the set of methods defined for the generic function that was called. A method is specialized on a required parameter that has a type constraints. The type constraint of the required parameter is called the parameter specializer of the parameter. A method is applicable if the argument to the generic function is an instance of the parameter specializer of the method.
For example, consider the decode-total-seconds generic function. Table 5.1 shows which method is applicable for certain arguments.
The first row of the table shows that, when the argument is a direct instance of <time-of-day>, the method on <time> is applicable, because the argument is an instance of <time> (the method's parameter specializer). The final row of the table shows that, when the argument is "hello, world", none of the defined methods are applicable, because "hello, world" is not an instance of <time> or <integer>.
For decode-total-seconds, there is either no or one applicable method for any argument. If there is one applicable method, it is called. If there is no applicable method, the "No applicable method" error is signaled. There is no need to continue to step 2.
In other cases, there can be several applicable methods. Consider the generic function say-greeting, shown in Figure 5.4. Table 5.2 shows that, for certain arguments, one method is applicable, but that, for an integer argument, two methods are applicable.
When the argument is 7, a direct instance of <integer>, the method on <object> is applicable, because 7 is an instance of <object> (the method's parameter specializer); the method on <integer> also is applicable, because 7 is an instance of <integer> (the method's parameter specializer).
Argument | Applicable method(s) |
|---|---|
| method on |
| method on |
| method on |




