Click or drag to resize

yieldAggregateYieldAggregateT, R Method (IEnumerableT, FuncT, R, R, R)

Namespace:  WhetStone.Looping
Assembly:  WhetStone (in WhetStone.dll) Version: 1.0.4.0 (1.0.0.0)
Syntax
C#
public static IEnumerable<R> YieldAggregate<T, R>(
	this IEnumerable<T> this,
	Func<T, R, R> aggregator,
	R seed = null
)

Parameters

this
Type: System.Collections.GenericIEnumerableT
The IEnumerableT to aggregate.
aggregator
Type: SystemFuncT, R, R
The aggregator function.
seed (Optional)
Type: R
The seed for the aggregator and the first item to return.

Type Parameters

T
The type of the IEnumerableT.
R
The type of the aggregate value.

Return Value

Type: IEnumerableR
All the partial aggregates of this.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

The first element in the output is seed, so the output will always include one element more than the input.

See Also