Method Fold
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, TResult>)
Returns the result of applying a function to a sequence of 1 element.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, TResult>)
Returns the result of applying a function to a sequence of 2 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, TResult>)
Returns the result of applying a function to a sequence of 3 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 4 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 5 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 6 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 7 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 8 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 9 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 10 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 11 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 12 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 13 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 14 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 15 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|
Fold<T, TResult>(IAsyncEnumerable<T>, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult>)
Returns the result of applying a function to a sequence of 16 elements.
Declaration
public static ValueTask<TResult> Fold<T, TResult>(this IAsyncEnumerable<T> source, Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> folder)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
source | The sequence of items to fold. |
Func<T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, TResult> | folder | Function to apply to the elements in the sequence. |
Returns
Type | Description |
---|---|
Value |
The folded value returned by |
Type Parameters
Name | Description |
---|---|
T | Type of element in the source sequence |
TResult | Type of the result |
Remarks
This operator uses immediate execution and buffers as many items of the source sequence as necessary.
Exceptions
Type | Condition |
---|---|
Argument |
|
Invalid |
|