-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Type of issue
Missing information
Description
Hi team,
Thank you for the details documentation on the Options in F#.
As a beginner, I did find some information missing that would be very valuable for converting Option to another type.
where other documentation would go straight into Pattern Matching Some/None,
F# also has a handy build-in function Option.defaultValue (as referenced here: https://stackoverflow.com/a/39436459)
A little expansion of the "Converting to Other Types" section of the documentation with for example:
String and Int
would already help with the following guided code:
optionString |> Option.defaultValue ""
optionInt |> Option.defaultValue 0Thank you for consideration!
Page URL
https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/options
Content source URL
https://github.com/dotnet/docs/blob/main/docs/fsharp/language-reference/options.md
Document Version Independent Id
431e250a-3588-7741-dd43-8021d6c7ffa8
Article author
Metadata
- ID: ed1e23a2-091b-38be-3bbe-b3b38aa06aa5
- Service: dotnet-fsharp