Skip to content
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

F# Recursive Modules/Namespaces code example has redundant/confusing members #41533

Closed
VisualMelon opened this issue Jun 23, 2024 · 2 comments
Closed
Labels
dotnet-fsharp/svc help wanted Good for community contributors to help [up-for-grabs] in-pr This issue will be closed (fixed) by an active pull request.

Comments

@VisualMelon
Copy link

Type of issue

Typo

Description

The banana example for Recursive Modules in F# includes a type Banana with member IsPeeled which is always false; should presumably be removed or replaced with something like

member self.IsPeeled with get() = List.forall ((=) Peeled) self.Sides

It also looks like Peel should be mutating the object, e.g.

member self.Peel() = self.Sides <- BananaHelpers.peel self

The same apply to the example for Recursive Namespaces

(is this kind of feedback useful or just noise?)

Page URL

https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/modules

Content source URL

https://github.com/dotnet/docs/blob/main/docs/fsharp/language-reference/modules.md

Document Version Independent Id

6f88dfb3-c9f9-3715-5121-83a1f22223b8

Article author

@KathleenDollard

Metadata

  • ID: 379f00ab-ebc1-50eb-6779-3a22ec41a80d
  • Service: dotnet-fsharp
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Jun 23, 2024
@dotnetrepoman dotnetrepoman bot removed the ⌚ Not Triaged Not triaged label Nov 18, 2024
@BillWagner BillWagner added help wanted Good for community contributors to help [up-for-grabs] ⌚ Not Triaged Not triaged labels Nov 18, 2024
@dotnetrepoman dotnetrepoman bot removed the ⌚ Not Triaged Not triaged label Nov 18, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Jan 8, 2025
@shethaadit
Copy link
Contributor

Hi @BillWagner, could we please close this since my PR is merged?

@VisualMelon
Copy link
Author

New definition of Banana.peel is written in an unexpected way, but certainly the issues in the OP are addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fsharp/svc help wanted Good for community contributors to help [up-for-grabs] in-pr This issue will be closed (fixed) by an active pull request.
Projects
None yet
Development

No branches or pull requests

4 participants