7.7.7 Normalization

Prev Up Next Page 203 of 800 Search internet

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

The normalization function is a 'retraction' in the sense that it is idempotent: x norm norm = x norm. The range of the retraction x norm with bottom 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 x norm with bottom removed this tells us that e.g. a pair whose tail is an exception is, by definition, not a 'tagged datum'.

Prev Up Next Page 203 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05