Share via


RuntimeHelpers.EnumerateFromFunctions<'T,'U> Function (F#)

The F# compiler emits calls to this function to implement the compiler-intrinsic conversions from weakly typed IEnumerable sequences to typed sequences.

Namespace/Module Path: Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers

Assembly: FSharp.Core (in FSharp.Core.dll)

// Signature:
RuntimeHelpers.EnumerateFromFunctions : (unit -> 'T) -> ('T -> bool) -> ('T -> 'U) -> seq<'U>

// Usage:
RuntimeHelpers.EnumerateFromFunctions create moveNext current

Parameters

  • create
    Type: unit -> 'T

    An initializer function.

  • moveNext
    Type: 'T -> bool

    A function to iterate and test if end of sequence is reached.

  • current
    Type: 'T -> 'U

    A function to retrieve the current element.

Return Value

The resulting typed sequence.

Platforms

Windows 7, Windows Vista SP2, Windows XP SP3, Windows XP x64 SP2, Windows Server 2008 R2, Windows Server 2008 SP2, Windows Server 2003 SP2

Version Information

F# Runtime

Supported in: 2.0, 4.0

Silverlight

Supported in: 3

See Also

Reference

CompilerServices.RuntimeHelpers Module (F#)

Microsoft.FSharp.Core.CompilerServices Namespace (F#)