2022-03-31 20:34:17 -04:00
|
|
|
namespace FruityFoundation.FsBase
|
|
|
|
open FruityFoundation.Base.Structures
|
|
|
|
|
2022-12-23 12:36:02 -05:00
|
|
|
module Option =
|
|
|
|
let toMaybe : 'a option -> Maybe<'a> = function
|
2023-08-01 22:12:54 -04:00
|
|
|
| Some x -> x |> Maybe.Just
|
2022-03-31 20:34:17 -04:00
|
|
|
| None -> Maybe.Empty ()
|
|
|
|
|
2022-12-23 12:36:02 -05:00
|
|
|
let fromMaybe : Maybe<'a> -> 'a option = function
|
|
|
|
| x when x.HasValue -> Some x.Value
|
|
|
|
| _ -> None
|