fold<T> method

  1. @override
T fold<T>(
  1. T initialValue,
  2. T combine(
    1. T previousValue,
    2. E element
    )
)
override

Reduces the set to a single value by iteratively combining elements.

This is a non-mutating operation.

Implementation

@override
T fold<T>(T initialValue, T Function(T previousValue, E element) combine) =>
    value.fold(initialValue, combine);