This particular function uses two of the three selector expressions from the template. Just naming the results of the selector expressions and reading the problem statement makes the definition obvious. This second function uses the same two selector expressions as the first example, but in a different way. The key observation, however, is that the template reminds us of all the information that we have available. When we define the function, we must use and combine the available information.
Figure presents the recipe for compound data in tabular form.
In practice, though, a function contains many functions that all work on the same class of input data. It is therefore normal to reuse the template many times, which means that examples are often constructed after the template is set up. Compare it with the design recipes in figures and .