The type system

To get some idea of how Red's types are linked together, here is a schema with Red's types (you can refer to it whenever you encounter a new type; the ones we encounter in this book are printed in bold):

You see that types are defined in a hierarchy, and the root type is any-type!. Red also defines sets of datatypes, such as scalar!, any-string!, or any-block!.

Furthermore, integer!, float!, and percent! are all number! types. Types such as scalar! or number! are called typeset! values, they are sets of types. However, any-type! is the typeset! value that contains all other types.

none! is the type of the none value, which ...

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.