In the preceding section, we used posn structures with exactly two components to represent pixels. If many of the pixels are on the x -axis, we can simplify the representation by using plain numbers for those pixels and posn structures for the remaining ones.
Figure contains a sample collection of such points.
Three of the five points, namely C , D , and E are on the x -axis. The function may be applied to a number or a posn . Thus we need to use a cond -expression to distinguish the two cases. Unfortunately, we don't have any operations to formulate the appropriate conditions. For each structure definition, Scheme also introduces a separate predicate so that we can distinguish among distinct classes of structures.