[Home] Module Microsoft.FSharp.Core.Operators


Modules (as contributed by assembly 'FSharp.Core')

ModuleDescription
Microsoft.FSharp.Core.Operators.Checked This module contains the basic arithmetic operations with overflow checks.
Microsoft.FSharp.Core.Operators.OptimizedFunctions
Microsoft.FSharp.Core.Operators.OptimizedRanges
Microsoft.FSharp.Core.Operators.Unchecked This module contains the basic arithmetic operations with overflow checks.

Values

ValueDescription
val ( ! ) : 'a ref -> 'a
Dereference a mutable reference cell
val ( % ) : overloaded
Overloaded modulo operator
val ( &&& ) : overloaded
Overloaded logical-AND operator
val ( * ) : overloaded
Overloaded multiplication operator
val ( ** ) : overloaded
Overloaded power operator.
val ( + ) : overloaded
Overloaded addition operator
val ( - ) : overloaded
Overloaded subtraction operator
val ( .. ) : overloaded
The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences
val ( .. .. ) : overloaded
The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences
val ( / ) : overloaded
Overloaded division operator
val ( := ) : 'a ref -> 'a -> unit
Assign to a mutable reference cell
val ( < ) : 'a -> 'a -> bool
Structural less-than comparison
val ( << ) : ('b -> 'c) -> ('a -> 'b) -> ('a -> 'c)
Compose two functions, the function on the right being applied first
val ( <<< ) : overloaded
Overloaded byte-shift left operator by a specified number of bits
val ( <= ) : 'a -> 'a -> bool
Structural less-than-or-equal comparison
val ( <> ) : 'a -> 'a -> bool
Structural inequality
val ( <| ) : ('a -> 'b) -> 'a -> 'b
Apply a function to a value, the value being on the right, the function on the left
val ( = ) : 'a -> 'a -> bool
Structural equality
val ( > ) : 'a -> 'a -> bool
Structural greater-than
val ( >= ) : 'a -> 'a -> bool
Structural greater-than-or-equal
val ( >> ) : ('a -> 'b) -> ('b -> 'c) -> ('a -> 'c)
Compose two functions, the function on the left being applied first
val ( >>> ) : overloaded
Overloaded byte-shift right operator by a specified number of bits
val ( @ ) : 'a list -> 'a list -> 'a list
Concatenate two lists.
val ( ^ ) : string -> string -> string
Concatenate two strings. The overlaoded operator '+' may also be used.
val ( ^^^ ) : overloaded
Overloaded logical-XOR operator
val ( |> ) : 'a -> ('a -> 'b) -> 'b
Apply a function to a value, the value being on the left, the function on the right
val ( ||| ) : overloaded
Overloaded logical-OR operator
val ( ~+ ) : overloaded
Overloaded prefix=plus operator
val ( ~- ) : overloaded
Overloaded unary negation.
val ( ~~~ ) : overloaded
Overloaded logical-NOT operator
val abs : overloaded
Absolute value of the given number
val acos : overloaded
Inverse cosine of the given number
val asin : overloaded
Inverse sine of the given number
val assert : bool -> unit
Call System.Diagnostics.Debug.Assert(condition). Calls to this function are generated when assert is used as a first class function value
val atan : overloaded
Inverse tangent of the given number
val atan2 : overloaded
Inverse tangent of x/y where x and y are specified separately
val box : 'a -> obj
Boxes a strongly typed value.
val byte : overloaded
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
val ceil : overloaded
Ceiling of the given number
val char : overloaded
Converts the argument to character. Numeric inputs are converted according to the UTF-16 encoding for characters. String inputs must be exactly one character long. For other types a static member ToChar must exist on the type.
val compare : 'a -> 'a -> int
Generic comparison
val cos : overloaded
Cosine of the given number
val cosh : overloaded
Hyperbolic cosine of the given number
val decimal : overloaded
Converts the argument to System.Decimal using a direct conversion for all primitive numeric types and requiring a ToDecimal method otherwise
val decr : int ref -> unit
Decrement a mutable reference cell containing an integer
val defaultArg : 'a option -> 'a -> 'a
Used to specify a default value for an optional argument in the implementation of a function
val double : overloaded
Converts the argument to 64-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type
val enum : int32 -> 'b (requires enum)
Converts the argument to a particular enum type.
val exit : int -> 'a
Exit the current hardware isolated process, if security settings permit, otherwise raise an exception. Calls System.Environment.Exit.
val exp : overloaded
Exponential of the given number
val failwith : string -> 'a
Throw a FailureException exception
val float : overloaded
Converts the argument to 64-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Double.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToDouble method on the input type
val float32 : overloaded
Converts the argument to 32-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type
val floor : overloaded
Floor of the given number
val fst : ('b * 'a) -> 'b
Return the first element of a tuple, fst (a,b) = a.
val hash : 'a -> int
The "hash" function is a structural hash function. It is designed to return equal hash values for items that are equal according to the standard "=" operator. The exact behaviour of the function can be adjusted on a type-by-type basis by implementing GetHashCode and/or the IStructuralHash interface for each type.
val id : 'a -> 'a
The identity function
val ignore : 'a -> unit
Ignore the passed value. This is often used to throw away results of a computation.
val incr : int ref -> unit
Increment a mutable reference cell containing an integer
val infinity : float
Equivalent to System.Double.PositiveInfinity
val infinityf : float32
Equivalent to System.Single.PositiveInfinity
val int : overloaded
Converts the argument to signed 32-bit integer. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type
val int16 : overloaded
Converts the argument to signed 16-bit integer. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Int16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt16 method on the input type
val int32 : overloaded
Converts the argument to signed 32-bit integer. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Int32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt32 method on the input type
val int64 : overloaded
Converts the argument to signed 64-bit integer. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Int64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToInt64 method on the input type
val invalid_arg : string -> 'a
Throw an ArgumentException exception
val invalid_op : string -> 'a
Throw an InvalidOperationException exception
val lock : 'lock -> (unit -> 'a) -> 'a (requires reference type)
Execute the function as a mutual-exlcusion region using the input value as a lock.
val log : overloaded
Natural logarithm of the given number
val log10 : overloaded
Logarithm to base 10 of the given number
val max : 'a -> 'a -> 'a
Maximum based on generic comparison
val min : 'a -> 'a -> 'a
Minimum based on generic comparison
val nan : float
Equivalent to System.Double.NaN
val nanf : float32
Equivalent to System.Single.NaN
val nativeint : overloaded
Converts the argument to signed native integer. This is a direct conversion for all primitive numeric types and ToIntPtr method otherwise)
val not : bool -> bool
Negate a logical value. not true equals false and not false equals true
val not_found : unit -> 'a
Throw an KeyNotFoundException exception
val pown : overloaded
Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x.
val raise : Exception -> 'b
Raises an exception
val ref : 'a -> 'a ref
Create a mutable reference cell
[<NoDynamicInvocationAttribute ()>]
val rethrow : unit -> 'a
Rethrows an exception. This should only be used when handling an exception
val round : overloaded
Round the given number
val sbyte : overloaded
Converts the argument to signed byte. This is a direct conversion for all primitive numeric types. For strings, the input is converted using SByte.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSByte method on the input type
val sign : overloaded
Sign of the given number
val sin : overloaded
Sine of the given number
val single : overloaded
Converts the argument to 32-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using Single.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToSingle method on the input type
val sinh : overloaded
Hyperbolic sine of the given number
[<RequiresExplicitTypeArgumentsAttribute ()>]
val sizeof<'a> : int
Returns the internal size of a type in bytes. For example, sizeof<int> returns 4.
val snd : ('a * 'b) -> 'b
Return the second element of a tuple, snd (a,b) = b.
val sqrt : overloaded
Square root of the given number
val stderr : TextWriter
Returns the value of the property System.Console.Error.
val stdin : TextReader
Returns the value of the property System.Console.In.
val stdout : TextWriter
Returns the value of the property System.Console.Out.
val string : 'a -> string
Converts the argument to a string using ToString. For standard integer and floating point values the ToString conversion uses CultureInfo.InvariantCulture. Note, native integer ToString does not support specifying CultureInfo.
val tan : overloaded
Tangent of the given number
val tanh : overloaded
Hyperbolic tangent of the given number
val truncate : overloaded
Overloaded truncate operator.
[<RequiresExplicitTypeArgumentsAttribute ()>]
val typedefof<'a> : Type
Generate a System.Type representation for a type definition. If the input type is a generic type instantiation then return the generic type definition associated with all such instantiations.
[<RequiresExplicitTypeArgumentsAttribute ()>]
val typeof<'a> : Type
Generate a System.Type runtime represenation of a static type. The static type is still maintained on the value returned.
val uint16 : overloaded
Converts the argument to unsigned 16-bit integer. This is a direct conversion for all primitive numeric types. For strings, the input is converted using UInt16.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt16 method on the input type
val uint32 : overloaded
Converts the argument to unsigned 32-bit integer. This is a direct conversion for all primitive numeric types. For strings, the input is converted using UInt32.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt32 method on the input type
val uint64 : overloaded
Converts the argument to unsigned 64-bit integer. This is a direct conversion for all primitive numeric types. For strings, the input is converted using UInt64.Parse() with InvariantCulture settings. Otherwise the operation requires and invokes a ToUInt64 method on the input type
val unativeint : overloaded
Converts the argument to unsigned native integer using a direct conversion for all primitive numeric types and requiring a ToUintPtr method otherwise
val unbox : obj -> 'a
Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a.
val using : 'a -> ('a -> 'b) -> 'b (requires 'a :> IDisposable)
Clean up resources associated with the input object after the completion of the given function. Cleanup occurs even when an exception is raised by the protected code.

Active Patterns

Active PatternDescription
val ( |KeyValue| ) : KeyValuePair<'a,'b> -> 'a * 'b
An active pattern to match values of type System.Collections.Generic.KeyValuePair

See Also

Microsoft.FSharp.Core


Documentation for assembly FSharp.Core, version 1.9.6.0, generated using F# Programming Language version 1.9.6.0