There are certain very common basic operations that require the use of loops:

*counter*: count the number of values in a set;*accumulator*: accumulate values in a set according to a certain criterion;*characteristic values in a set*: determine a characteristic value among the values in a set (for example, the maximum, when the values in the set are ordered).

Each type of operation is based on a common scheme of the loop statement.