Processing Two Complex Pieces of Data

external ~<#19337#>Functions that process two arbitrarily large values come up once in a while but not too often. Even when they show up, they often belong to the first two cases, not the third one where there is no obvious connection. Indeed, the third one is so rare that it is difficult to find enough interesting examples.<#19337#> On occasion, a function consumes two arguments that belong to classes with non-trivial data definitions. In some cases, one of the arguments should be treated as if it were atomic; a precisely formulated purpose statement typically clarifies this. In other cases, the two arguments must be processed in lockstep. Finally, in a few rare cases, the function must take into account all possible cases and process the arguments accordingly. This section illustrates the three cases with examples and provides an augmented design recipe for the last one. The last section discusses the equality of compound data and its relationship to testing; it is essential for automating test suites for functions.