Performs the fold-left (forward accumulation) algorithm using the given IAccumulator
The general forward accumulation algorithm would not take an accumulator as a top-level
input parameter, instead the accumulator would be hidden inside the algorithm.