Table of contents
TOC
Collapse the table of content
Expand the table of content

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

Den Delimarsky|Last Updated: 8/18/2017
|
1 Contributor

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

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

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

Syntax

// 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 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

CompilerServices.RuntimeHelpers Module (F#)

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

© 2019 Microsoft