Let's develop a mental model for what happens in a program with types and values. At its core, a program is made up of a series of type and value definitions. For example:
/* src/Ch02/Ch02_Demo.re */
type person = {id: int, name: string};
type company = {id: int, name: string, employees: list(person)};
let bob = {id: 1, name: "Bob"};
let acmeCo = {id: 1, name: "Acme Co.", employees: [bob]};
Here, we're defining person and company types, and then allocating a person (bob) and a company he works for (acmeCo).
Without worrying too much about the syntax (we will introduce this in Chapter 4, Group Values Together in Types), let's think about how the programming environment sees this program.
In a statically typed programming language, the typechecker and runtime environment together make up the static and dynamic environments...