Additional operations on ValueOption
Function or value | Description |
Full Usage:
ValueOption.apply f x
Parameters:
('T -> 'U) voption
-
The option function.
x : 'T voption
-
The option value.
Returns: 'U voption
An option of the function applied to the value, or ValueNone if either the function or the value is ValueNone .
|
|
Full Usage:
ValueOption.ofOption source
Parameters:
'T option
Returns: 'T voption
|
|
Full Usage:
ValueOption.ofPair (arg1, arg2)
Parameters:
bool
arg1 : 'T
Returns: 'T voption
ValueSome if bool is `true`, ValueNone otherwise.
|
|
Full Usage:
ValueOption.ofResult source
Parameters:
Result<'T, 'Error>
-
The Result value.
Returns: 'T voption
The resulting option value.
|
The error value (if any) is lost.
|
Full Usage:
ValueOption.protect f x
Parameters:
'T -> 'U
x : 'T
Returns: 'U voption
|
|
|
|
Full Usage:
ValueOption.toResult source
Parameters:
'T voption
-
The option value.
Returns: Result<'T, unit>
The resulting Result value.
|
|
Full Usage:
ValueOption.toResultWith errorValue source
Parameters:
'Error
-
The error value to be used in case of ValueNone.
source : 'T voption
-
The option value.
Returns: Result<'T, 'Error>
The resulting Result value.
|
|
Full Usage:
ValueOption.unzip v
Parameters:
('T * 'U) voption
-
The value.
Returns: 'T voption * 'U voption
The resulting tuple.
|
|
Full Usage:
ValueOption.zip x y
Parameters:
'T voption
-
The first value.
y : 'U voption
-
The second value.
Returns: ('T * 'U) voption
The resulting option.
|
|
Full Usage:
ValueOption.zip3 x y z
Parameters:
'T voption
-
The first value.
y : 'U voption
-
The second value.
z : 'V voption
-
The third value.
Returns: ('T * 'U * 'V) voption
The resulting option.
|