Skip to content

Conversation

@shethaadit
Copy link
Contributor

@shethaadit shethaadit commented Jan 24, 2025

Summary

This PR enhances the F# Options documentation by providing additional examples and guidance in the "Converting to Other Types" section. The updates include:

  • Added examples of using the Option.defaultValue function to convert options to default values for string and int types.
  • Highlighted practical scenarios to avoid None values and simplify handling with Option.defaultValue.
  • Improved accessibility for beginners by offering a more comprehensive explanation of converting options without diving directly into pattern matching.

Fixes #40039


Internal previews

📄 File 🔗 Preview link
docs/fsharp/language-reference/options.md Options

@dotnetrepoman dotnetrepoman bot added this to the January 2025 milestone Jan 24, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-fsharp/svc community-contribution Indicates PR is created by someone from the .NET community. labels Jan 24, 2025
Copy link
Contributor

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, good addition IMO.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @shethaadit

One small nit, and then this is ready to merge.

@BillWagner BillWagner enabled auto-merge (squash) January 27, 2025 14:28
@BillWagner BillWagner merged commit e3ae3bd into dotnet:main Jan 27, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-fsharp/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Options - F# missing convert to other types

3 participants