The past section significantly expands our world of data. We must now deal
with a universe that contains booleans, symbols, and structures of many
different kinds. Let's bring some order to this world.
We start with a summary:
- numbers:
- representations of numeric information;
- booleans:
- truth and falsity;
- symbols:
- representations of symbolic information; and
- structures:
- representations of compounds of information.
Thus far, our functions always processed symbols, numbers, subclasses of
numbers, or classes of structures. On occasion, however, a function must
process a class of data that includes both numbers and structures or
structures of several different kinds. We learn to design such functions in
this section. In addition, we learn how to protect functions from bad
uses. Here a bad use means that some user might accidentally apply a
function for drawing circles to a rectangle. Although we have agreed that
such users violate our data definitions, we should nevertheless know a
technique for protecting ourselves against them.