UNION:
Factor documentation > Factor handbook > The language > Objects > Classes > Union classes
Next:define-union-class ( class members -- )


Vocabulary
syntax

Syntax
UNION: class members... ;


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


Word description
Defines a union class. An object is an instance of a union class if it is an instance of one of its members.

See also
union-class, define-union-class

Definition
USING: classes.parser classes.union parser ;

IN: syntax

SYNTAX: UNION:
scan-new-class parse-definition define-union-class ;