fold<T> method
Reduces a map to a single value by iteratively combining elements of the map using the provided function.
Implementation
T fold<T>(T initialValue, T Function(T previousValue, MapEntry<K, V> entry) combine) {
return entries.fold(initialValue, combine);
}