Rex Tutorial
This tutorial is a guided walk-through of writing Rex code.
Examples marked as interactive can be edited and run in the docs. Some explanatory snippets are static, including deliberately incomplete or invalid code used to illustrate type errors.
If you want a compact reference instead, see the Language Reference. For locked semantics and edge cases, see the Specification.
The tutorial is divided into three sections:
- Section 1 — Basics — Core language features and syntax
- Section 2 — Advanced Topics — Type system, polymorphism, and typeclasses
- Section 3 — Worked Examples — Practical examples and patterns