Udostępnij za pośrednictwem


Core.ExtraTopLevelOperators Module (F#)

Additional F# operators and types that are available without opening a module or namespace.

Namespace/Module Path: Microsoft.FSharp.Core

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

[<AutoOpen>]
module ExtraTopLevelOperators

Values

Value

Description

( ~% ) : Expr<'T> -> 'T

Special prefix operator for splicing typed expressions into quotation holes.

( ~%% ) : Expr -> 'T

Special prefix operator for splicing untyped expressions into quotation holes.

array2D : seq<#seq<'T>> -> 'T [,]

Builds a 2D array from a sequence of sequences of elements.

async : AsyncBuilder

Build an asynchronous workflow using computation expression syntax.

dict : seq<'Key * 'Value> -> IDictionary<'Key,'Value>

Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality.

double : ^T -> float

Converts the argument to 64-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type.

eprintf : TextWriterFormat<'T> -> 'T

Print to stderr using the given format.

eprintfn : TextWriterFormat<'T> -> 'T

Print to stderr using the given format, and add a newline

failwithf : StringFormat<'T,'TResult> -> 'T

Print to a string buffer and raise an exception with the given result. Helper printers must return strings.

fprintf : TextWriter -> TextWriterFormat<'T> -> 'T

Print to a file using the given format

fprintfn : TextWriter -> TextWriterFormat<'T> -> 'T

Print to a file using the given format, and add a newline

int8 : ^T -> sbyte

Converts the argument to signed byte. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSByte method on the input type.

printf : TextWriterFormat<'T> -> 'T

Print to stdout using the given format.

printfn : TextWriterFormat<'T> -> 'T

Print to stdout using the given format, and add a newline.

set : seq<'T> -> Set<'T>

Builds a set from a sequence of objects. The objects are indexed using generic comparison.

single : ^T -> single

Converts the argument to 32-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type.

sprintf : StringFormat<'T> -> 'T

Print to a string using the given format.

uint8 : ^T -> byte

Converts the argument to byte. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Byte.Parse on strings and otherwise requires a ToByte method on the input type.

Active Patterns

Active Pattern

Description

( |Lazy| ) : Lazy<'T> -> 'T

An active pattern to force the execution of values of type Lazy.

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

Microsoft.FSharp.Core Namespace (F#)