Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 7, 2025

Summary

Fixes the issue where the arrow (->) operator syntax appeared in a code example without prior introduction or explanation.

Changes

Added a brief introduction to the arrow syntax before the first code example that uses it in the loops-for-in-expression.md document. The addition:

  • Explains that -> is a shorthand for do yield in sequence expressions and computation expressions
  • Clarifies that it allows you to specify an expression whose value becomes part of the sequence
  • Provides links to the Sequences and Computation Expressions documentation for readers seeking more detailed information

Example

The code snippet that was appearing without context:

let seq1 = seq { for i in 1 .. 10 -> (i, i*i) }

Now has an introduction explaining the -> operator before readers encounter it in the example.

Closes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Missing introduction of arrow syntax </issue_title>
<issue_description>Using the error approach appears without introduction in a sample. Suggest this appear at the top with the initial syntax introduction.

let seq1 = seq { for i in 1 .. 10 -> (i, i*i) }

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Comments on the Issue (you are @copilot in this section)

@BillWagner In addition to a brief introduction to the syntax, the fix should provide links to more details on this syntax.
Fixes #26356

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Internal previews

📄 File 🔗 Preview link
docs/fsharp/language-reference/loops-for-in-expression.md docs/fsharp/language-reference/loops-for-in-expression

@dotnet-policy-service dotnet-policy-service bot added okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. dotnet-fsharp/svc labels Oct 7, 2025
Copilot AI changed the title [WIP] Missing introduction of arrow syntax Add introduction to arrow syntax in for...in expression documentation Oct 7, 2025
Copilot AI requested a review from BillWagner October 7, 2025 13:30
Copilot finished work on behalf of BillWagner October 7, 2025 13:30
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.

This is ready for final review.

@BillWagner BillWagner marked this pull request as ready for review October 8, 2025 13:01
@BillWagner BillWagner requested review from a team as code owners October 8, 2025 13:01
@BillWagner BillWagner requested review from IEvangelist and Copilot and removed request for a team October 8, 2025 13:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds documentation to clarify the arrow (->) operator syntax in F# sequence expressions that was previously appearing without introduction in a code example.

  • Adds an explanation of the -> operator as shorthand for do yield in sequence and computation expressions
  • Provides context links to more detailed documentation on Sequences and Computation Expressions
  • Addresses the issue where syntax appeared in examples without prior explanation

@BillWagner BillWagner requested a review from a team October 8, 2025 13:01
@BillWagner BillWagner merged commit d0b5f56 into main Oct 8, 2025
14 checks passed
@BillWagner BillWagner deleted the copilot/fix-a8925690-49ca-4c74-a593-014bd9b4f840 branch October 8, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dotnet-fsharp/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing introduction of arrow syntax

3 participants