Applies a binary operator to a start value and all elements of this list, going left to right.
Namespace: FlinqAssembly: Flinq (in Flinq.dll) Version: 1.0.2.0 (1.0.2.0)
Syntax
C# |
---|
public static B FoldLeft<A, B>( this IEnumerable<A> source, B z, Func<B, A, B> op ) |
Parameters
- source
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'A>)>)>
The input sequence.
- z
- Type: B
The start value.
- 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: BThe result of inserting op between consecutive elements of this list, going left to right with the start value z on the left.