A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://morelinq.github.io/3.0/ref/api/html/M_MoreLinq_Extensions_FoldExtension_Fold__2_8.htm below:

FoldExtensionFoldT, TResult Method (IEnumerableT, FuncT, TResult)

FoldExtensionFoldT, TResult Method (IEnumerableT, FuncT, TResult)

Returns the result of applying a function to a sequence of 1 element.

Namespace:  MoreLinq.Extensions
Assembly:

MoreLinq (in MoreLinq.dll) Version: 3.0.0

Syntax
public static TResult Fold<T, TResult>(
	this IEnumerable<T> source,
	Func<T, TResult> folder
)
<ExtensionAttribute>
Public Shared Function Fold(Of T, TResult) ( 
	source As IEnumerable(Of T),
	folder As Func(Of T, TResult)
) As TResult
public:
[ExtensionAttribute]
generic<typename T, typename TResult>
static TResult Fold(
	IEnumerable<T>^ source, 
	Func<T, TResult>^ folder
)
[<ExtensionAttribute>]
static member Fold : 
        source : IEnumerable<'T> * 
        folder : Func<'T, 'TResult> -> 'TResult 
Parameters
source
Type: System.Collections.GenericIEnumerableT
The sequence of items to fold.
folder
Type: SystemFuncT, TResult
Function to apply to the elements in the sequence.
Type Parameters
T
Type of element in the source sequence
TResult
Type of the result
Return Value

Type:

TResult

The folded value returned by

folder

.

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)

.

Exceptions Remarks

This operator uses immediate execution and effectively buffers as many items of the source sequence as necessary.

See Also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4