Skip to content

Fix misleading XML documentation for pairwise functions #18587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 21, 2025

The XML documentation for the pairwise function in the List, Array, and Seq modules was unclear about the order of elements in the returned pairs. The original documentation did not explicitly state which element comes first in each pair, which could lead to confusion.

This PR clarifies the documentation by explicitly stating that "the predecessor comes first in the returned pairs" in all three module interfaces:

  • src/FSharp.Core/list.fsi
  • src/FSharp.Core/array.fsi
  • src/FSharp.Core/seq.fsi

The change is documentation-only and doesn't affect any code behavior. The examples in the documentation already correctly showed the ordering, but the summary text needed to be more explicit for developers using IDE tool tips.

Before:

/// <summary>Returns a list of each element in the input list and its predecessor, with the
/// exception of the first element which is only returned as the predecessor of the second element.</summary>

After:

/// <summary>Returns a list of each element in the input list paired with its predecessor, with the
/// exception of the first element which is only returned as the predecessor of the second element.
/// The predecessor comes first in the returned pairs.</summary>

Fixes #17052.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pkgs.dev.azure.com
    • Triggering command: /home/REDACTED/work/fsharp/fsharp/.dotnet/dotnet msbuild /m /nologo /clp:Summary /v:minimal /nr:true /warnaserror /p:TreatWarningsAsErrors=true /p:ContinuousIntegrationBuild=false /home/REDACTED/work/fsharp/fsharp/artifacts/toolset/restore.proj /t:__WriteToolsetLocation /clp:ErrorsOnly;NoSummary /p:__ToolsetLocationOutputFile=/home/REDACTED/work/fsharp/fsharp/artifacts/toolset/9.0.0-beta.25266.2.txt (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 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.

@Copilot Copilot AI changed the title [WIP] FSharp.Core. summary XML documentation for pairwise (List, Array, and Seq) is misleading Fix misleading XML documentation for pairwise functions May 21, 2025
@Copilot Copilot AI requested a review from T-Gro May 21, 2025 13:08
@T-Gro T-Gro removed their request for review May 21, 2025 17:10
@T-Gro T-Gro marked this pull request as ready for review May 21, 2025 17:10
@T-Gro T-Gro requested a review from a team as a code owner May 21, 2025 17:10
Copy link
Contributor

github-actions bot commented May 21, 2025

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@T-Gro T-Gro added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label May 21, 2025
@T-Gro T-Gro requested a review from abonie May 21, 2025 17:11
@T-Gro T-Gro enabled auto-merge (squash) May 21, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes
Projects
Status: New
Development

Successfully merging this pull request may close these issues.

FSharp.Core. summary XML documentation for pairwise (List, Array, and Seq) is misleading
2 participants