For inexact numbers, the difference is significant. Depending on which function we use to sum up the items of this list, we get vastly different results. Its template is that for N -processing functions. To make the invariant true at the beginning, we must use 1 for the accumulator. That is, it is the desired result.
Figure contains the complete definition.
The left column shows how the original version works, the right one how the accumulator-style function proceeds. In addition, the right column illustrates how the new factorial function maintains the accumulator invariant. Surprisingly, this affects the performance of the function in a negative manner. For the last example, we study a function on simplified binary trees. Indeed, it is as common for complicated data definitions as it is for lists and natural numbers.