define-generic ( word combination effect -- )
Factor handbook » The language » Objects » Generic words and methods » Generic word introspection

Prev:generic? ( object -- ? )
Next:define-simple-generic ( word effect -- )


Vocabulary
generic

Inputs
worda word
combinationa method combination
effectan effect


Outputs
None

Word description
Defines a generic word. A method combination is an object which responds to the perform-combination generic word.

Generic word contract
The method combination quotation is called each time the generic word has to be updated (for example, when a method is added), and thus must be side-effect free.

See also
generic, define-simple-generic, GENERIC:, GENERIC#:, MATH:, HOOK:

Definition