Additional operations on Nullable
Function or value | Description |
|
|
Full Usage:
Nullable.count n
Parameters:
Nullable<'a>
-
The Nullable value.
Returns: int
1 if the Nullable has a value, 0 otherwise.
|
|
Full Usage:
Nullable.defaultValue defValue n
Parameters:
'a
-
The value to use if the Nullable does not have a value.
n : Nullable<'a>
-
The Nullable value.
Returns: 'a
The value inside the Nullable or defValue.
|
|
Full Usage:
Nullable.defaultWith defThunk n
Parameters:
unit -> 'a
-
The function that returns a default value.
n : Nullable<'a>
-
The Nullable value.
Returns: 'a
The value inside the Nullable or the result of defThunk.
|
|
Full Usage:
Nullable.exists pred n
Parameters:
'a -> bool
-
Function to test against the inner value.
n : Nullable<'a>
-
The Nullable value.
Returns: bool
True if the Nullable contains a value that matches the predicate, false otherwise.
|
|
|
|
Full Usage:
Nullable.fold f state n
Parameters:
'a -> 'b -> 'a
-
A function to update the state data when given a value from the Nullable.
state : 'a
-
The initial state.
n : Nullable<'b>
-
The Nullable value.
Returns: 'a
The new state if the Nullable contained a value, the original state otherwise.
|
|
Full Usage:
Nullable.foldBack f state n
Parameters:
'a -> 'b -> 'b
-
A function to update the state data when given a value from the Nullable.
state : 'b
-
The initial state.
n : Nullable<'a>
-
The Nullable value.
Returns: 'b
The new state if the Nullable contained a value, the original state otherwise.
|
|
Full Usage:
Nullable.forall pred n
Parameters:
'a -> bool
-
Function to test against the inner value.
n : Nullable<'a>
-
The Nullable value.
Returns: bool
True if the Nullable is empty or the value matches the predicate, false otherwise.
|
|
Full Usage:
Nullable.hasValue n
Parameters:
Nullable<'a>
-
The Nullable value.
Returns: bool
True if the Nullable has a value, false otherwise.
|
|
Full Usage:
Nullable.isNull n
Parameters:
Nullable<'a>
-
The Nullable value.
Returns: bool
True if the Nullable does not have a value, false otherwise.
|
|
Full Usage:
Nullable.iter f n
Parameters:
'a -> 'b
-
The function to apply to the value of a Nullable.
n : Nullable<'a>
-
The Nullable value.
|
|
|
|
Full Usage:
Nullable.toArray n
Parameters:
Nullable<'a>
-
The Nullable value.
Returns: 'a[]
An array that contains the value in the Nullable if there is one, or an empty array.
|
|
Full Usage:
Nullable.toList n
Parameters:
Nullable<'a>
-
The Nullable value.
Returns: 'a list
A list that contains the value in the Nullable if there is one, or an empty list.
|
|