fold
Accumulates values, starting with initial, and applying operation to each element in the LongList in order.
Parameters
initial
The value of acc for the first call to operation or return value if there are no elements in this list.
operation
function that takes current accumulator value and an element, and calculates the next accumulator value.