Variables with reference type are introduced with ref declarations, which give lists of identifiers and their initial values. An example is ref x = 1, y = 2. Where such a definition is in scope, the defined reference variables are used like normal variables with no need to explicitly dereference them. The value of a reference variable is updated with the usual := operator, with the difference that such update assignments are separate kinds of statements, not expressions with unit type.

Adam Chlipala 2005-02-22