diff --git a/src/FSharpPlus/Extensions/ValueOption.fs b/src/FSharpPlus/Extensions/ValueOption.fs index 3a5ef1c93..030b9f487 100644 --- a/src/FSharpPlus/Extensions/ValueOption.fs +++ b/src/FSharpPlus/Extensions/ValueOption.fs @@ -71,7 +71,14 @@ module ValueOption = | true, x -> ValueSome x | false, _ -> ValueNone - let toOption x = - match x with + /// Converts a ValueOption to an Option. + let toOption (source: ValueOption<'T>) = + match source with | ValueSome x -> Some x | ValueNone -> None + + /// Converts an Option to a ValueOption. + let ofOption (source: option<'T>) = + match x with + | Some x -> ValueSome x + | None -> ValueNone