M:
Factor documentation > Factor handbook > The language > Objects > Generic words and methods
Prev:MATH:
Next:Method precedence


Vocabulary
syntax

Syntax
M: class generic definition... ;


Inputs and outputs
classa class word
generica generic word
definitiona method definition


Word description
Defines a method, that is, a behavior for the generic word specialized on instances of the class.

See also
M::

Definition
USING: generic.parser words ;

IN: syntax

SYNTAX: M: (M:) define ;