OptionalValue
Provides various helper functions for using the OptionalValue<T>
type from F#
(The functions are similar to those in the standard Option
module).
Functions and values
Function or value | Description |
asOption value
Signature:value:'T opt -> 'T option
Type parameters: 'T |
Turns the |
bind f input
Signature:f:('T -> OptionalValue<'R>) -> input:OptionalValue<'T> -> OptionalValue<'R>
Type parameters: 'T, 'R |
If the |
get optional
Signature:optional:'T opt -> 'T
Type parameters: 'T |
Get the value stored in the specified optional value. If a value is not
available, throws an exception. (This is equivalent to the |
map f input
Signature:f:('T -> 'R) -> input:OptionalValue<'T> -> OptionalValue<'R>
Type parameters: 'T, 'R |
If the |
ofNullable value
Signature:value:Nullable<'T> -> 'T opt
Type parameters: 'T |
Creates |
ofOption opt
Signature:opt:'T option -> 'T opt
Type parameters: 'T |
Turns a standard F# |
ofTuple (b, value)
Signature:(b:bool * value:'T) -> 'T opt
Type parameters: 'T |
Creates
|
Active patterns
Active pattern | Description |
( |Missing|Present| ) optional
Signature:optional:'T opt -> Choice<unit,'T>
Type parameters: 'T |
Complete active pattern that can be used to pattern match on
|