## 7.7.7 Normalization

 Page 203 of 800 Search internet

The function 'normalizes' x into being a tagged map. For all maps x, either equals or equals a tagged map. Furthermore, for tagged data x.

The normalization function is a 'retraction' in the sense that it is idempotent: . The range of the retraction with removed equals the set of tagged data. For that reason we shall refer to the set of tagged data as a 'retract'.

The normalization function traverses x recursively. As an example, if x is a pair then the normalization function normalizes the head of the pair, normalizes the tail of the pair, and then returns the pair of the normalized values.

Using raw maps it is possible to forge e.g. a pair whose head is an integer and whose tail is an exception. Normalization of such a forged pair will normalize the integer, then normalize the exception, then compute the pair of the integer and the exception, which yields an exception.

Thus, after normalization, a data structure cannot have an exception embedded inside the structure. Since the set of tagged data equals the range of with removed this tells us that e.g. a pair whose tail is an exception is, by definition, not a 'tagged datum'.

 Page 203 of 800 Search logiweb.eu