Reduces the whole sequence to a single value by invoking
operation with each element
from left to right. For every invocation of the operation
acc is the result of the last
invocation. For the first invocation of the operation
acc is the first element of the
sequence. In addition the
index of the current element is also passed to the operation.