The specification of a function states, without describing how the function works, what it computes: its name and parameters, the values its parameters may take, and the result it returns or the change it makes for each of those values.
Ejemplos
Example 1.5 (The specification of a maximum)
For a function largest(t): the precondition is “t is a non-empty list of numbers”; the postcondition is “the result is an element of t, and no element of t is larger”. The empty list is excluded because it has no largest element: the specification forces the author to decide this case instead of leaving it to chance.