Variables

A variable a of type A is declared as follows:

a:A;

A variable may be given an initial value when declared:

a:A <- b;

When an initial value is used in this way, the let keyword may be used to infer the type of that variable, rather than specifying it explicitly:

let a <- b;
In fact let may be used to declare multiple variables simultaneously, where initial values are given as a tuple:
let (a, b) <- (c, d);

Variables may be named using Latin or Greek upper or lower case letters, underscore (_) and prime ('). The prime is often used for the names of temporary variables or of updates to existing variables, as in mathematics.

Tip

The probabilistic operators may also be used to assign initial values.