-
Notifications
You must be signed in to change notification settings - Fork 847
Some examples for the List module. Small refactor of the String examples as requested by reviewer. #12134
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
Conversation
dsyme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a bunch of comments :)))
Nearly all the examples are really great. I think needs some additional work for fold/foldBack
src/fsharp/FSharp.Core/list.fsi
Outdated
| /// | ||
| /// <example id="countBy-example-1"> | ||
| /// <code lang="fsharp"> | ||
| /// let isEven x = 0 = x % 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example feels a bit too mathematical (modulus) - better to be getting a statistic of some kind, e.g. count a list of lists by length, or strings by number of occurrences of characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Counted the letters in the ['H'; 'a'; 'p'; 'p'; 'i'; 'n'; 'e'; 's'; 's'] . Do you think that will be better to use "Happiness".ToCharArray() |> Array.toList ?
|
Thank you Don for review! |
|
Just a few more comments |
|
Thanks so much. Pushed some cosmetic changes, when it's green it'll merge |
Some examples for the List module. Small refactor of the String examples as requested by reviewer.
Tracking issue: #12124