LanguageExt.Core

LanguageExt.Core Class Instances

If you're new to this library or functional-programming this is almost certainly not the place to start browsing!

Class-instances try to replicate the instances of Haskell in C#. They pair with the traits using ad-hoc polymorphism.

Ad-hoc polymorphism has long been believed to not be possible in C#. However with some cunning it is. Ad-hoc polymorphism allows programmers to add traits to a type later. For example in C# it would be amazing if we had an interface called INumeric for numeric types like int, long, double, etc. The reason this doesn't exist is if you write a function like:

INumeric Add(INumeric x, INumeric y) => x + y;

Then it would cause boxing. Which is slow (well, slower). I can only assume that's why it wasn't added by the BCL team. Anyway, it's possible to create a numeric type, very much like a trait in Haskell, and ad-hoc instances of the numeric trait that allow for generic numeric operations without boxing. See the wiki for a deeper dive into ad-hoc polymorphism

Contents

Sub modules

Eq
Hashable
Monoid
Ord

struct TBigInt Source #

Integer number

Properties

property bigint Empty Source #

Monoid empty value (0)

Parameters

returns

0

Methods

method bool Equals (bigint x, bigint y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (bigint x, bigint y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method bigint Add (bigint x, bigint y) Source #

Find the sum of two numbers

Parameters

param x

left hand side of the addition operation

param y

right hand side of the addition operation

returns

The sum of x and y

method bigint Subtract (bigint x, bigint y) Source #

Find the difference between two values

Parameters

param x

left hand side of the subtraction operation

param y

right hand side of the subtraction operation

returns

The difference between x and y

method bigint Multiply (bigint x, bigint y) Source #

Find the product of two numbers

Parameters

param x

left hand side of the product operation

param y

right hand side of the product operation

returns

The product of x and y

method bigint Divide (bigint x, bigint y) Source #

Divide two numbers

Parameters

param x

left hand side of the division operation

param y

right hand side of the division operation

returns

x / y

method bigint Abs (bigint x) Source #

Find the absolute value of a number

Parameters

param x

The value to find the absolute value of

returns

The non-negative absolute value of x

method bigint Signum (bigint x) Source #

Find the sign of x

Parameters

param x

The value to find the sign of

returns

-1, 0, or +1

method bigint FromInteger (int x) Source #

Generate a numeric value from an integer

Parameters

param x

The integer to use

returns

The equivalent of x in the Num

method bigint FromDecimal (decimal x) Source #

Generate a numeric value from a float

Parameters

param x

The float to use

returns

The equivalent of x in the Num

method bigint FromFloat (float x) Source #

Generate a numeric value from a double

Parameters

param x

The double to use

returns

The equivalent of x in the Num

method bigint FromDouble (double x) Source #

Generate a numeric value from a decimal

Parameters

param x

The decimal to use

returns

The equivalent of x in the Num

method bigint Negate (bigint x) Source #

Negate the value

Parameters

param x

Value to negate

returns

The negated source value

method bigint Append (bigint x, bigint y) Source #

Semigroup append (sum)

Parameters

param x

left hand side of the append operation

param y

right hand side of the append operation

returns

x + y

method int GetHashCode (bigint x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method bigint True () Source #

Returns True

Parameters

returns

True

method bigint False () Source #

Returns False

Parameters

returns

False

method bigint And (bigint a, bigint b) Source #

Returns the result of the bitwise AND operation between a and b

Parameters

returns

The result of the bitwise AND operation between a and b

method bigint Or (bigint a, bigint b) Source #

Returns the result of the bitwise OR operation between a and b

Parameters

returns

The result of the bitwise OR operation between a and b

method bigint Not (bigint a) Source #

Returns the result of the bitwise NOT operation on a

Parameters

returns

The result of the bitwise NOT operation on a

method bigint XOr (bigint a, bigint b) Source #

Returns the result of the bitwise exclusive-OR operation between a and b

Parameters

returns

The result of the bitwise exclusive-OR operation between a and b

method bigint Implies (bigint a, bigint b) Source #

Logical implication

Parameters

returns

If a is true that implies b, else true

method bigint BiCondition (bigint a, bigint b) Source #

Bitwise bi-conditional.

Parameters

returns

Not(XOr(a, b))

struct TBool Source #

Bool class instance. Implements

Eq<bool>
Ord<bool>
Bool<bool>

Methods

method bool And (bool a, bool b) Source #

Returns the result of the logical AND operation between a and b

Parameters

returns

The result of the logical AND operation between a and b

method int Compare (bool x, bool y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method bool Equals (bool x, bool y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method bool False () Source #

Returns False

Parameters

returns

False

method int GetHashCode (bool x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method bool Not (bool a) Source #

Returns the result of the logical NOT operation on a

Parameters

returns

The result of the logical NOT operation on a

method bool Or (bool a, bool b) Source #

Returns the result of the logical OR operation between a and b

Parameters

returns

The result of the logical OR operation between a and b

method bool True () Source #

Returns True

Parameters

returns

True

method bool XOr (bool a, bool b) Source #

Returns the result of the logical exclusive-OR operation between a and b

Parameters

returns

The result of the logical exclusive-OR operation between a and b

method bool Implies (bool a, bool b) Source #

Logical implication

Parameters

returns

If a is true that implies b, else true

method bool BiCondition (bool a, bool b) Source #

Logical bi-conditional. Both a and b must be true, or both a and b must be false.

Parameters

returns

true if a == b, false otherwise

struct TBoolBool Source #

TBoolBool class instance. Implements

Eq<(bool, bool)>
Ord<(bool, bool)>
Bool<(bool, bool)>

Methods

method (bool, bool) And ((bool, bool) a, (bool, bool) b) Source #

Returns the result of the logical AND operation between a and b

Parameters

returns

The result of the logical AND operation between a and b

method int Compare ((bool, bool) x, (bool, bool) y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method bool Equals ((bool, bool) x, (bool, bool) y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method (bool, bool) False () Source #

Returns False

Parameters

returns

False

method int GetHashCode ((bool, bool) x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method (bool, bool) Not ((bool, bool) a) Source #

Returns the result of the logical NOT operation on a

Parameters

returns

The result of the logical NOT operation on a

method (bool, bool) Or ((bool, bool) a, (bool, bool) b) Source #

Returns the result of the logical OR operation between a and b

Parameters

returns

The result of the logical OR operation between a and b

method (bool, bool) True () Source #

Returns True

Parameters

returns

True

method (bool, bool) XOr ((bool, bool) a, (bool, bool) b) Source #

Returns the result of the logical exclusive-OR operation between a and b

Parameters

returns

The result of the logical exclusive-OR operation between a and b

method (bool, bool) Implies ((bool, bool) a, (bool, bool) b) Source #

Logical implication

Parameters

returns

If a is true that implies b, else true

method (bool, bool) BiCondition ((bool, bool) a, (bool, bool) b) Source #

Logical bi-conditional. Both a and b must be true, or both a and b must be false.

Parameters

returns

true if a == b, false otherwise

struct TChar Source #

Integer number

Methods

method bool Equals (char x, char y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (char x, char y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int GetHashCode (char x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method char Add (char x, char y) Source #

method char Subtract (char x, char y) Source #

method char Multiply (char x, char y) Source #

method char Negate (char x) Source #

struct TDecimal Source #

Methods

method bool Equals (decimal x, decimal y) Source #

Equality test

Parameters

param x

Left hand side of the equality operation

param y

Right hand side of the equality operation

returns

True if parameters are equal

method int Compare (decimal x, decimal y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method decimal Add (decimal x, decimal y) Source #

Find the sum of two values

Parameters

param x

left hand side of the addition operation

param y

right hand side of the addition operation

returns

The sum of x and y

method decimal Subtract (decimal x, decimal y) Source #

Find the difference between two values

Parameters

param x

left hand side of the subtraction operation

param y

right hand side of the subtraction operation

returns

The difference between x and y

method decimal Multiply (decimal x, decimal y) Source #

Find the product of two values

Parameters

param x

left hand side of the product operation

param y

right hand side of the product operation

returns

The product of x and y

method decimal Divide (decimal x, decimal y) Source #

Divide two numbers

Parameters

param x

left hand side of the division operation

param y

right hand side of the division operation

returns

x / y

method decimal Abs (decimal x) Source #

Find the absolute value of a number

Parameters

param x

The value to find the absolute value of

returns

The non-negative absolute value of x

method decimal Signum (decimal x) Source #

Find the sign of x

Parameters

param x

The value to find the sign of

returns

-1, 0, or +1

method decimal FromInteger (int x) Source #

Generate a numeric value from an integer

Parameters

param x

The integer to use

returns

The equivalent of x in the Num

method decimal FromDecimal (decimal x) Source #

Generate a numeric value from a decimal

Parameters

param x

The decimal to use

returns

The equivalent of x in the Num

method decimal FromFloat (float x) Source #

Generate a numeric value from a float

Parameters

param x

The float to use

returns

The equivalent of x in the Num

method decimal FromDouble (double x) Source #

Generate a numeric value from a double

Parameters

param x

The double to use

returns

The equivalent of x in the Num

method decimal FromRational (Ratio<int> x) Source #

Generates a fractional value from an integer ratio.

Parameters

param x

The ratio to convert

returns

The equivalent of x in the implementing type.

method decimal Pi () Source #

Returns an approximation of pi.

Parameters

returns

A reasonable approximation of pi in this type

method decimal Exp (decimal x) Source #

The exponential function.

Parameters

param x

The value for which we are calculating the exponential

returns

method decimal Sqrt (decimal x) Source #

Calculates the square root of a value.

Parameters

param x

The value for which we are calculating the square root.

returns

.

method decimal Log (decimal x) Source #

Calculates the natural logarithm of a value.

Parameters

param x

The value for which we are calculating the natural logarithm.

returns

.

method decimal Pow (decimal x, decimal y) Source #

Raises x to the power y

Parameters

param x

The base to be raised to y

param y

The exponent to which we are raising x

returns

.

method decimal LogBase (decimal b, decimal x) Source #

Calculates the logarithm of a value with respect to an arbitrary base.

Parameters

param x

The base to use for the logarithm of t

param y

The value for which we are calculating the logarithm.

returns

.

method decimal Sin (decimal x) Source #

Calculates the sine of an angle.

Parameters

param x

An angle, in radians

returns

method decimal Cos (decimal x) Source #

Calculates the cosine of an angle.

Parameters

param x

An angle, in radians

returns

method decimal Tan (decimal x) Source #

Calculates the tangent of an angle.

Parameters

param x

An angle, in radians

returns

method decimal Asin (decimal x) Source #

Calculates an arcsine.

Parameters

param x

The value for which an arcsine is to be calculated.

returns

, in radians.

method decimal Acos (decimal x) Source #

Calculates an arc-cosine.

Parameters

param x

The value for which an arc-cosine is to be calculated

returns

, in radians

method decimal Atan (decimal x) Source #

Calculates an arc-tangent.

Parameters

param x

The value for which an arc-tangent is to be calculated

returns

, in radians

method decimal Sinh (decimal x) Source #

Calculates a hyperbolic sine.

Parameters

param x

The value for which a hyperbolic sine is to be calculated

returns

method decimal Cosh (decimal x) Source #

Calculates a hyperbolic cosine.

Parameters

param x

The value for which a hyperbolic cosine is to be calculated

returns

method decimal Tanh (decimal x) Source #

Calculates a hyperbolic tangent.

Parameters

param x

The value for which a hyperbolic tangent is to be calculated.

returns

method decimal Asinh (decimal x) Source #

Calculates an area hyperbolic sine

Parameters

param x

The value for which an area hyperbolic sine is to be calculated.

returns

.

method decimal Acosh (decimal x) Source #

Calculates an area hyperbolic cosine.

Parameters

param x

The value for which an area hyperbolic cosine is to be calculated.

returns

.

method decimal Atanh (decimal x) Source #

Calculates an area hyperbolic tangent.

Parameters

param x

The value for which an area hyperbolic tangent is to be calculated.

returns

method decimal Negate (decimal x) Source #

Negate the value

Parameters

param x

Value to negate

returns

The negated source value

method int GetHashCode (decimal x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

struct TDouble Source #

Methods

method bool Equals (double x, double y) Source #

Equality test

Parameters

param x

Left hand side of the equality operation

param y

Right hand side of the equality operation

returns

True if parameters are equal

method int Compare (double x, double y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method double Add (double x, double y) Source #

Find the sum of two values

Parameters

param x

left hand side of the addition operation

param y

right hand side of the addition operation

returns

The sum of x and y

method double Subtract (double x, double y) Source #

Find the difference between two values

Parameters

param x

left hand side of the subtraction operation

param y

right hand side of the subtraction operation

returns

The difference between x and y

method double Multiply (double x, double y) Source #

Find the product of two values

Parameters

param x

left hand side of the product operation

param y

right hand side of the product operation

returns

The product of x and y

method double Divide (double x, double y) Source #

Divide two numbers

Parameters

param x

left hand side of the division operation

param y

right hand side of the division operation

returns

x / y

method double Abs (double x) Source #

Find the absolute value of a number

Parameters

param x

The value to find the absolute value of

returns

The non-negative absolute value of x

method double Signum (double x) Source #

Find the sign of x

Parameters

param x

The value to find the sign of

returns

-1, 0, or +1

method double FromInteger (int x) Source #

Generate a numeric value from an integer

Parameters

param x

The integer to use

returns

The equivalent of x in the Num

method double FromDecimal (decimal x) Source #

Generate a numeric value from a decimal

Parameters

param x

The decimal to use

returns

The equivalent of x in the Num

method double FromFloat (float x) Source #

Generate a numeric value from a float

Parameters

param x

The float to use

returns

The equivalent of x in the Num

method double FromDouble (double x) Source #

Generate a numeric value from a double

Parameters

param x

The double to use

returns

The equivalent of x in the Num

method double FromRational (Ratio<int> x) Source #

Generates a fractional value from an integer ratio.

Parameters

param x

The ratio to convert

returns

The equivalent of x in the implementing type.

method double Pi () Source #

Returns an approximation of pi.

Parameters

returns

A reasonable approximation of pi in this type

method double Exp (double x) Source #

The exponential function.

Parameters

param x

The value for which we are calculating the exponential

returns

method double Sqrt (double x) Source #

Calculates the square root of a value.

Parameters

param x

The value for which we are calculating the square root.

returns

.

method double Log (double x) Source #

Calculates the natural logarithm of a value.

Parameters

param x

The value for which we are calculating the natural logarithm.

returns

.

method double Pow (double x, double y) Source #

Raises x to the power y

Parameters

param x

The base to be raised to y

param y

The exponent to which we are raising x

returns

.

method double LogBase (double b, double x) Source #

Calculates the logarithm of a value with respect to an arbitrary base.

Parameters

param x

The base to use for the logarithm of t

param y

The value for which we are calculating the logarithm.

returns

.

method double Sin (double x) Source #

Calculates the sine of an angle.

Parameters

param x

An angle, in radians

returns

method double Cos (double x) Source #

Calculates the cosine of an angle.

Parameters

param x

An angle, in radians

returns

method double Tan (double x) Source #

Calculates the tangent of an angle.

Parameters

param x

An angle, in radians

returns

method double Asin (double x) Source #

Calculates an arcsine.

Parameters

param x

The value for which an arcsine is to be calculated.

returns

, in radians.

method double Acos (double x) Source #

Calculates an arc-cosine.

Parameters

param x

The value for which an arc-cosine is to be calculated

returns

, in radians

method double Atan (double x) Source #

Calculates an arc-tangent.

Parameters

param x

The value for which an arc-tangent is to be calculated

returns

, in radians

method double Sinh (double x) Source #

Calculates a hyperbolic sine.

Parameters

param x

The value for which a hyperbolic sine is to be calculated

returns

method double Cosh (double x) Source #

Calculates a hyperbolic cosine.

Parameters

param x

The value for which a hyperbolic cosine is to be calculated

returns

method double Tanh (double x) Source #

Calculates a hyperbolic tangent.

Parameters

param x

The value for which a hyperbolic tangent is to be calculated.

returns

method double Asinh (double x) Source #

Calculates an area hyperbolic sine

Parameters

param x

The value for which an area hyperbolic sine is to be calculated.

returns

.

method double Acosh (double x) Source #

Calculates an area hyperbolic cosine.

Parameters

param x

The value for which an area hyperbolic cosine is to be calculated.

returns

.

method double Atanh (double x) Source #

Calculates an area hyperbolic tangent.

Parameters

param x

The value for which an area hyperbolic tangent is to be calculated.

returns

method double Negate (double x) Source #

Negate the value

Parameters

param x

Value to negate

returns

The negated source value

method int GetHashCode (double x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

struct TFloat Source #

Methods

method bool Equals (float x, float y) Source #

Equality test

Parameters

param x

Left hand side of the equality operation

param y

Right hand side of the equality operation

returns

True if parameters are equal

method int Compare (float x, float y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method float Add (float x, float y) Source #

Find the sum of two values

Parameters

param x

left hand side of the addition operation

param y

right hand side of the addition operation

returns

The sum of x and y

method float Subtract (float x, float y) Source #

Find the difference between two values

Parameters

param x

left hand side of the subtraction operation

param y

right hand side of the subtraction operation

returns

The difference between x and y

method float Multiply (float x, float y) Source #

Find the product of two values

Parameters

param x

left hand side of the product operation

param y

right hand side of the product operation

returns

The product of x and y

method float Divide (float x, float y) Source #

Divide two numbers

Parameters

param x

left hand side of the division operation

param y

right hand side of the division operation

returns

x / y

method float Abs (float x) Source #

Find the absolute value of a number

Parameters

param x

The value to find the absolute value of

returns

The non-negative absolute value of x

method float Signum (float x) Source #

Find the sign of x

Parameters

param x

The value to find the sign of

returns

-1, 0, or +1

method float FromInteger (int x) Source #

Generate a numeric value from an integer

Parameters

param x

The integer to use

returns

The equivalent of x in the Num

method float FromDecimal (decimal x) Source #

Generate a numeric value from a decimal

Parameters

param x

The decimal to use

returns

The equivalent of x in the Num

method float FromFloat (float x) Source #

Generate a numeric value from a float

Parameters

param x

The float to use

returns

The equivalent of x in the Num

method float FromDouble (double x) Source #

Generate a numeric value from a double

Parameters

param x

The double to use

returns

The equivalent of x in the Num

method float FromRational (Ratio<int> x) Source #

Generates a fractional value from an integer ratio.

Parameters

param x

The ratio to convert

returns

The equivalent of x in the implementing type.

method float Pi () Source #

Returns an approximation of pi.

Parameters

returns

A reasonable approximation of pi in this type

method float Exp (float x) Source #

The exponential function.

Parameters

param x

The value for which we are calculating the exponential

returns

method float Sqrt (float x) Source #

Calculates the square root of a value.

Parameters

param x

The value for which we are calculating the square root.

returns

.

method float Log (float x) Source #

Calculates the natural logarithm of a value.

Parameters

param x

The value for which we are calculating the natural logarithm.

returns

.

method float Pow (float x, float y) Source #

Raises x to the power y

Parameters

param x

The base to be raised to y

param y

The exponent to which we are raising x

returns

.

method float LogBase (float b, float x) Source #

Calculates the logarithm of a value with respect to an arbitrary base.

Parameters

param x

The base to use for the logarithm of t

param y

The value for which we are calculating the logarithm.

returns

.

method float Sin (float x) Source #

Calculates the sine of an angle.

Parameters

param x

An angle, in radians

returns

method float Cos (float x) Source #

Calculates the cosine of an angle.

Parameters

param x

An angle, in radians

returns

method float Tan (float x) Source #

Calculates the tangent of an angle.

Parameters

param x

An angle, in radians

returns

method float Asin (float x) Source #

Calculates an arcsine.

Parameters

param x

The value for which an arcsine is to be calculated.

returns

, in radians.

method float Acos (float x) Source #

Calculates an arc-cosine.

Parameters

param x

The value for which an arc-cosine is to be calculated

returns

, in radians

method float Atan (float x) Source #

Calculates an arc-tangent.

Parameters

param x

The value for which an arc-tangent is to be calculated

returns

, in radians

method float Sinh (float x) Source #

Calculates a hyperbolic sine.

Parameters

param x

The value for which a hyperbolic sine is to be calculated

returns

method float Cosh (float x) Source #

Calculates a hyperbolic cosine.

Parameters

param x

The value for which a hyperbolic cosine is to be calculated

returns

method float Tanh (float x) Source #

Calculates a hyperbolic tangent.

Parameters

param x

The value for which a hyperbolic tangent is to be calculated.

returns

method float Asinh (float x) Source #

Calculates an area hyperbolic sine

Parameters

param x

The value for which an area hyperbolic sine is to be calculated.

returns

.

method float Acosh (float x) Source #

Calculates an area hyperbolic cosine.

Parameters

param x

The value for which an area hyperbolic cosine is to be calculated.

returns

.

method float Atanh (float x) Source #

Calculates an area hyperbolic tangent.

Parameters

param x

The value for which an area hyperbolic tangent is to be calculated.

returns

method float Negate (float x) Source #

Negate the value

Parameters

param x

Value to negate

returns

The negated source value

method int GetHashCode (float x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

struct TInt Source #

Integer number

Methods

method bool Equals (int x, int y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (int x, int y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int Add (int x, int y) Source #

Find the sum of two numbers

Parameters

param x

left hand side of the addition operation

param y

right hand side of the addition operation

returns

The sum of x and y

method int Subtract (int x, int y) Source #

Find the difference between two values

Parameters

param x

left hand side of the subtraction operation

param y

right hand side of the subtraction operation

returns

The difference between x and y

method int Multiply (int x, int y) Source #

Find the product of two numbers

Parameters

param x

left hand side of the product operation

param y

right hand side of the product operation

returns

The product of x and y

method int Divide (int x, int y) Source #

Divide two numbers

Parameters

param x

left hand side of the division operation

param y

right hand side of the division operation

returns

x / y

method int Abs (int x) Source #

Find the absolute value of a number

Parameters

param x

The value to find the absolute value of

returns

The non-negative absolute value of x

method int Signum (int x) Source #

Find the sign of x

Parameters

param x

The value to find the sign of

returns

-1, 0, or +1

method int FromInteger (int x) Source #

Generate a numeric value from an integer

Parameters

param x

The integer to use

returns

The equivalent of x in the Num

method int FromDecimal (decimal x) Source #

Generate a numeric value from a float

Parameters

param x

The float to use

returns

The equivalent of x in the Num

method int FromFloat (float x) Source #

Generate a numeric value from a double

Parameters

param x

The double to use

returns

The equivalent of x in the Num

method int FromDouble (double x) Source #

Generate a numeric value from a decimal

Parameters

param x

The decimal to use

returns

The equivalent of x in the Num

method int Negate (int x) Source #

Negate the value

Parameters

param x

Value to negate

returns

The negated source value

method int GetHashCode (int x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method int True () Source #

Returns True

Parameters

returns

True

method int False () Source #

Returns False

Parameters

returns

False

method int And (int a, int b) Source #

Returns the result of the bitwise AND operation between a and b

Parameters

returns

The result of the bitwise AND operation between a and b

method int Or (int a, int b) Source #

Returns the result of the bitwise OR operation between a and b

Parameters

returns

The result of the bitwise OR operation between a and b

method int Not (int a) Source #

Returns the result of the bitwise NOT operation on a

Parameters

returns

The result of the bitwise NOT operation on a

method int XOr (int a, int b) Source #

Returns the result of the bitwise exclusive-OR operation between a and b

Parameters

returns

The result of the bitwise exclusive-OR operation between a and b

method int Implies (int a, int b) Source #

Logical implication

Parameters

returns

If a is true that implies b, else true

method int BiCondition (int a, int b) Source #

Bitwise bi-conditional.

Parameters

returns

Not(XOr(a, b))

struct TLong Source #

Long integer number

Methods

method bool Equals (long x, long y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (long x, long y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method long Add (long x, long y) Source #

Find the sum of two numbers

Parameters

param x

left hand side of the addition operation

param y

right hand side of the addition operation

returns

The sum of x and y

method long Subtract (long x, long y) Source #

Find the difference between two values

Parameters

param x

left hand side of the subtraction operation

param y

right hand side of the subtraction operation

returns

The difference between x and y

method long Multiply (long x, long y) Source #

Fund the product of two numbers

Parameters

param x

left hand side of the product operation

param y

right hand side of the product operation

returns

The product of x and y

method long Divide (long x, long y) Source #

Divide x by y

Parameters

param x

left hand side of the division operation

param y

right hand side of the division operation

returns

x / y

method long Abs (long x) Source #

Find the absolute value of a number

Parameters

param x

The value to find the absolute value of

returns

The non-negative absolute value of x

method long Signum (long x) Source #

Find the sign of x

Parameters

param x

The value to find the sign of

returns

-1, 0, or +1

method long FromInteger (int x) Source #

Generate a numeric value from an integer

Parameters

param x

The integer to use

returns

The equivalent of x in the Num

method long FromDecimal (decimal x) Source #

Generate a numeric value from a float

Parameters

param x

The float to use

returns

The equivalent of x in the Num

method long FromFloat (float x) Source #

Generate a numeric value from a double

Parameters

param x

The double to use

returns

The equivalent of x in the Num

method long FromDouble (double x) Source #

Generate a numeric value from a decimal

Parameters

param x

The decimal to use

returns

The equivalent of x in the Num

method long Negate (long x) Source #

Negate the value

Parameters

param x

Value to negate

returns

The negated source value

method int GetHashCode (long x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method long True () Source #

Returns True

Parameters

returns

True

method long False () Source #

Returns False

Parameters

returns

False

method long And (long a, long b) Source #

Returns the result of the bitwise AND operation between a and b

Parameters

returns

The result of the bitwise AND operation between a and b

method long Or (long a, long b) Source #

Returns the result of the bitwise OR operation between a and b

Parameters

returns

The result of the bitwise OR operation between a and b

method long Not (long a) Source #

Returns the result of the bitwise NOT operation on a

Parameters

returns

The result of the bitwise NOT operation on a

method long XOr (long a, long b) Source #

Returns the result of the bitwise exclusive-OR operation between a and b

Parameters

returns

The result of the bitwise exclusive-OR operation between a and b

method long Implies (long a, long b) Source #

Logical implication

Parameters

returns

If a is true that implies b, else true

method long BiCondition (long a, long b) Source #

Bitwise bi-conditional.

Parameters

returns

Not(XOr(a, b))

struct TNumericChar Source #

Integer number

Methods

method bool Equals (char x, char y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (char x, char y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int GetHashCode (char x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method char Add (char x, char y) Source #

method char Subtract (char x, char y) Source #

method char Multiply (char x, char y) Source #

method char Negate (char x) Source #

method char Abs (char x) Source #

method char Signum (char x) Source #

method char FromInteger (int x) Source #

method char FromDecimal (decimal x) Source #

method char FromFloat (float x) Source #

method char FromDouble (double x) Source #

method char Divide (char x, char y) Source #

struct TShort Source #

Short integer number

Methods

method bool Equals (short x, short y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (short x, short y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method short Add (short x, short y) Source #

Find the sum of two numbers

Parameters

param x

left hand side of the addition operation

param y

right hand side of the addition operation

returns

The sum of x and y

method short Subtract (short x, short y) Source #

Find the difference between two values

Parameters

param x

left hand side of the subtraction operation

param y

right hand side of the subtraction operation

returns

The difference between x and y

method short Multiply (short x, short y) Source #

Fund the product of two numbers

Parameters

param x

left hand side of the product operation

param y

right hand side of the product operation

returns

The product of x and y

method short Divide (short x, short y) Source #

Divide x by y

Parameters

param x

left hand side of the division operation

param y

right hand side of the division operation

returns

x / y

method short Abs (short x) Source #

Find the absolute value of a number

Parameters

param x

The value to find the absolute value of

returns

The non-negative absolute value of x

method short Signum (short x) Source #

Find the sign of x

Parameters

param x

The value to find the sign of

returns

-1, 0, or +1

method short FromInteger (int x) Source #

Generate a numeric value from an integer

Parameters

param x

The integer to use

returns

The equivalent of x in the Num

method short FromDecimal (decimal x) Source #

Generate a numeric value from a float

Parameters

param x

The float to use

returns

The equivalent of x in the Num

method short FromFloat (float x) Source #

Generate a numeric value from a double

Parameters

param x

The double to use

returns

The equivalent of x in the Num

method short FromDouble (double x) Source #

Generate a numeric value from a decimal

Parameters

param x

The decimal to use

returns

The equivalent of x in the Num

method short Negate (short x) Source #

Negate the value

Parameters

param x

Value to negate

returns

The negated source value

method int GetHashCode (short x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

method short True () Source #

Returns True

Parameters

returns

True

method short False () Source #

Returns False

Parameters

returns

False

method short And (short a, short b) Source #

Returns the result of the bitwise AND operation between a and b

Parameters

returns

The result of the bitwise AND operation between a and b

method short Or (short a, short b) Source #

Returns the result of the bitwise OR operation between a and b

Parameters

returns

The result of the bitwise OR operation between a and b

method short Not (short a) Source #

Returns the result of the bitwise NOT operation on a

Parameters

returns

The result of the bitwise NOT operation on a

method short XOr (short a, short b) Source #

Returns the result of the bitwise exclusive-OR operation between a and b

Parameters

returns

The result of the bitwise exclusive-OR operation between a and b

method short Implies (short a, short b) Source #

Logical implication

Parameters

returns

If a is true that implies b, else true

method short BiCondition (short a, short b) Source #

Bitwise bi-conditional.

Parameters

returns

Not(XOr(a, b))

struct TString Source #

Methods

method bool Equals (string x, string y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (string x, string y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int GetHashCode (string x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

struct TStringOrdinalIgnoreCase Source #

Methods

method bool Equals (string x, string y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (string x, string y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int GetHashCode (string x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

struct TStringOrdinal Source #

Methods

method bool Equals (string x, string y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (string x, string y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int GetHashCode (string x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

struct TStringCurrentCultureIgnoreCase Source #

Methods

method bool Equals (string x, string y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (string x, string y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int GetHashCode (string x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x

struct TStringCurrentCulture Source #

Methods

method bool Equals (string x, string y) Source #

Equality test

Parameters

param x

The left hand side of the equality operation

param y

The right hand side of the equality operation

returns

True if x and y are equal

method int Compare (string x, string y) Source #

Compare two values

Parameters

param x

Left hand side of the compare operation

param y

Right hand side of the compare operation

returns

if x greater than y : 1

if x less than y : -1

if x equals y : 0

method int GetHashCode (string x) Source #

Get the hash-code of the provided value

Parameters

returns

Hash code of x