Table of Contents

Method Aggregate

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

Aggregate<T>(IEnumerable<T>, Func<T, T, T>, Func<T, T, T>)

Aggregates the source collection using two different aggregation functions.

[Version(3, 0, 0)]
public static (T, T) Aggregate<T>(this IEnumerable<T> source, Func<T, T, T> aggregator1, Func<T, T, T> aggregator2)

Parameters

source IEnumerable<T>

The source collection to aggregate.

aggregator1 Func<T, T, T>

The first aggregation function.

aggregator2 Func<T, T, T>

The second aggregation function.

Returns

(T, T)

A tuple containing the results of the two aggregation functions.

Type Parameters

T

The type of elements in the source collection.