8.15.0.12
3.8 Mutable Variables and Assignment
binding operator | ||||||||||||
| ||||||||||||
|
If an annot is present using ::, then the value of every assignment to id must satisfy the annotation, and the value installed into id is the converted value if annot is a converter annotation. Static information from annot is associated with uses of id whether attached by :: or :~.
> count := "string"
count: value does not satisfy annotation
value: "string"
annotation: Int
An assignment operator that changes the value of id
to the result of expr and returns #void. The
id must be bound with mutable.
The := operator is also recognized by other forms, such as . and #%index, for changing mutable components of some values.
> count
1