Adding these to TLC requires typing rules. Given the tref type constructor, the rest is straightforward. Since we don't care about the result of an assignment statement, we assume it will always return the integer 13 . Adding references to datatype does not cause any difficulties. We gain the ability to create records with mutable fields.
References also integrate well with explicit polymorphism.
Now assume we have implicit polymorphism in our language. Now consider the addition of mutable records. In Scheme, this program would return 5 . However, an evaluation in TLC goes wrong. Instead of a boolean value, an integer will appear in the test position of the conditional during execution.