reduceTo<U> method

U reduceTo<U>(
  1. TFuncReducer<T, U> funcReducer,
  2. U defaultValue
)

Implementation

U reduceTo<U>(TFuncReducer<T, U> funcReducer, U defaultValue) {
	U reduced = defaultValue;
	for (T x in this) {
		reduced = funcReducer(reduced, x);
	}
	return reduced;
}