Accumulates a result from the list. Starting from the initial value seed this function applies the accumulator function and returns the final result.