Generic function

These are functions defined with TypeParameters, intended to be resolved with compile time type information.

The compiler uses these types to instantiate suitable versions, resolving any function overloading appropriately.

The book The Art of the Metaobject Protocol explains the implementation and use of CLOS generic functions in detail.

FIND-METHOD finds the method from the generic function collide specialized for the classes asteroid and spaceship.

Generic functions correspond roughly to what Smalltalk terms methods, with the notable exception that, in Smalltalk, the receiver's class is the sole determinant of which body of code is called: the types or values of the arguments are irrelevant (single dispatch).