fold<T> method

T fold<T>(
  1. T initialValue,
  2. T combine(
    1. T previousValue,
    2. MapEntry<K, V> entry
    )
)

Reduces a map to a single value by iteratively combining elements of the map using the provided function.

Iterable.fold

Implementation

T fold<T>(T initialValue, T Function(T previousValue, MapEntry<K, V> entry) combine) {
  return entries.fold(initialValue, combine);
}