Share via


RuntimeHelpers.EnumerateThenFinally<'T> Function (F#)

The F# compiler emits calls to this function to implement the try...finally construct for F# sequence expressions.

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

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

// Signature:
RuntimeHelpers.EnumerateThenFinally : seq<'T> -> (unit -> unit) -> seq<'T>

// Usage:
RuntimeHelpers.EnumerateThenFinally source compensation

Parameters

  • source
    Type: seq<'T>

    The input sequence.

  • compensation
    Type: unit -> unit

    A computation to be included in an enumerator's Dispose method.

Return Value

The result 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#)