make-generic ( word -- ) (original) (raw)

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

Prev: implementors ( class/classes -- seq )
Next: ( class generic -- method )

Vocabulary
generic

Inputs

word a generic

Outputs
None

Word description
Regenerates the definition of a generic word by applying the method combination to the set of defined methods.

Notes
Calling this word directly is not necessary in most cases. Higher-level words call it automatically.

Definition

USING: kernel words ;

IN: generic

: make-generic ( word -- )
[ "unannotated-def" remove-word-prop ]
[ dup "combination" word-prop perform-combination ] bi ;