INTERSECTION:
Factor documentation > Factor handbook > The language > Objects > Classes > Intersection classes
Next:define-intersection-class ( class participants -- )


Vocabulary
syntax

Syntax
INTERSECTION: class participants... ;


Inputs and outputs
classa new class word to define
participantsa list of class words separated by whitespace


Word description
Defines an intersection class. An object is an instance of an intersection class if it is an instance of all of its participants.

See also
intersection-class, define-intersection-class

Definition
USING: classes.intersection classes.parser parser ;

IN: syntax

SYNTAX: INTERSECTION:
scan-new-class parse-definition define-intersection-class ;