Logo FSharp.Core

NonStructuralComparison Module

A module of comparison and equality operators that are statically resolved, but which are not fully generic and do not make structural comparison. Opening this
 module may make code that relies on structural or generic comparison no longer compile.

Functions and values

Function or value Description

x < y

Full Usage: x < y

Parameters:
    x : ^T - The first parameter.
    y : ^U - The second parameter.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: ^T, ^U (requires (static member op_LessThan : ^T * ^U -> Microsoft.FSharp.Core.bool) and (static member op_LessThan : ^T * ^U -> Microsoft.FSharp.Core.bool))

Compares the two values for less-than

x : ^T

The first parameter.

y : ^U

The second parameter.

Returns: bool

The result of the comparison.

x <= y

Full Usage: x <= y

Parameters:
    x : ^T - The first parameter.
    y : ^U - The second parameter.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: ^T, ^U (requires (static member op_LessThanOrEqual : ^T * ^U -> Microsoft.FSharp.Core.bool) and (static member op_LessThanOrEqual : ^T * ^U -> Microsoft.FSharp.Core.bool))

Compares the two values for less-than-or-equal

x : ^T

The first parameter.

y : ^U

The second parameter.

Returns: bool

The result of the comparison.

x <> y

Full Usage: x <> y

Parameters:
    x : ^T - The first parameter.
    y : ^T - The second parameter.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: ^T (requires (static member op_Inequality : ^T * ^T -> Microsoft.FSharp.Core.bool))

Compares the two values for inequality

x : ^T

The first parameter.

y : ^T

The second parameter.

Returns: bool

The result of the comparison.

x = y

Full Usage: x = y

Parameters:
    x : ^T - The first parameter.
    y : ^T - The second parameter.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: ^T (requires (static member op_Equality : ^T * ^T -> Microsoft.FSharp.Core.bool))

Compares the two values for equality

x : ^T

The first parameter.

y : ^T

The second parameter.

Returns: bool

The result of the comparison.

x > y

Full Usage: x > y

Parameters:
    x : ^T - The first parameter.
    y : ^U - The second parameter.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: ^T, ^U (requires (static member op_GreaterThan : ^T * ^U -> Microsoft.FSharp.Core.bool) and (static member op_GreaterThan : ^T * ^U -> Microsoft.FSharp.Core.bool))

Compares the two values for greater-than

x : ^T

The first parameter.

y : ^U

The second parameter.

Returns: bool

The result of the comparison.

x >= y

Full Usage: x >= y

Parameters:
    x : ^T - The first parameter.
    y : ^U - The second parameter.

Returns: bool The result of the comparison.
Modifiers: inline
Type parameters: ^T, ^U (requires (static member op_GreaterThanOrEqual : ^T * ^U -> Microsoft.FSharp.Core.bool) and (static member op_GreaterThanOrEqual : ^T * ^U -> Microsoft.FSharp.Core.bool))

Compares the two values for greater-than-or-equal

x : ^T

The first parameter.

y : ^U

The second parameter.

Returns: bool

The result of the comparison.

compare e1 e2

Full Usage: compare e1 e2

Parameters:
    e1 : ^T - The first value.
    e2 : ^T - The second value.

Returns: int The result of the comparison.
Modifiers: inline
Type parameters: ^T (requires (static member op_LessThan : ^T * ^T -> Microsoft.FSharp.Core.bool) and (static member op_GreaterThan : ^T * ^T -> Microsoft.FSharp.Core.bool))

Compares the two values

e1 : ^T

The first value.

e2 : ^T

The second value.

Returns: int

The result of the comparison.

hash value

Full Usage: hash value

Parameters:
    value : 'T - The value.

Returns: int The hash code.
Modifiers: inline
Type parameters: 'T (requires equality)

Calls GetHashCode() on the value

value : 'T

The value.

Returns: int

The hash code.

max e1 e2

Full Usage: max e1 e2

Parameters:
    e1 : ^T - The first value.
    e2 : ^T - The second value.

Returns: ^T The maximum value.
Modifiers: inline
Type parameters: ^T (requires (static member op_LessThan : ^T * ^T -> Microsoft.FSharp.Core.bool))

Maximum of the two values

e1 : ^T

The first value.

e2 : ^T

The second value.

Returns: ^T

The maximum value.

min e1 e2

Full Usage: min e1 e2

Parameters:
    e1 : ^T - The first value.
    e2 : ^T - The second value.

Returns: ^T The minimum value.
Modifiers: inline
Type parameters: ^T (requires (static member op_LessThan : ^T * ^T -> Microsoft.FSharp.Core.bool))

Minimum of the two values

e1 : ^T

The first value.

e2 : ^T

The second value.

Returns: ^T

The minimum value.

Type something to start searching.