Applies a binary operator to all elements of this sequence, going left to right.

Namespace: Flinq
Assembly: Flinq (in Flinq.dll) Version: 1.0.2.0 (1.0.2.0)

Syntax

C#
public static B ReduceLeft<A, B>(
	this IEnumerable<A> source,
	Func<B, A, B> op
)
where A : B

Parameters

source
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'A>)>)>
The input sequence.
op
Type: System..::..Func<(Of <(<'B, A, B>)>)>
The binary operator.

Type Parameters

A
The type of the elements in the input sequence.
B
The type of the elements in the output sequence and the result type of the binary operator.

Return Value

Type: B
The result of inserting op between consecutive elements of this sequence, going left to right.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'A>)>)>. 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).

Exceptions

ExceptionCondition
System..::..InvalidOperationExceptionThrown when the input sequence is empty.

See Also