fold
Accumulates value starting with initial value and applying operation to current accumulator value and each entry of the map.
Returns the specified initial value if the map is empty.
Parameters
initial
initial value of the accumulation.
operation
function that takes current accumulator value and an entry of the map and calculates the next accumulator value.