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

some helper functions #92

Merged
merged 9 commits into from
Oct 22, 2021
Merged

Conversation

sideeffffect
Copy link
Contributor

No description provided.



[<Extension>]
type ExtraIDictionary() =
Copy link
Contributor

Choose a reason for hiding this comment

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

What are the types ExtraIDictionary and ExtraIReadOnlyDictionary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are extension classes that add TryFind, which returns an Option (that's the whole point) to C# dictionaries

Copy link
Contributor

Choose a reason for hiding this comment

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

Just a class to hold the extension methods.

Copy link
Contributor

@jackfoxy jackfoxy left a comment

Choose a reason for hiding this comment

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

Some of these extension methods, e.g. findExactlyOne, have no covering tests. Please add tests.

# Conflicts:
#	src/FSharpx.Collections/Collections.fs
@sergey-tihon sergey-tihon merged commit f841dbb into fsprojects:master Oct 22, 2021


[<Extension>]
type ExtraIDictionary() =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are extension classes that add TryFind, which returns an Option (that's the whole point) to C# dictionaries

| Choice2Of2 x -> Some x
| _ -> None
let inline chooser a = match a with
| Choice1Of2 x -> Some x
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I apologize, I've only now realized that there is this typo. It should be Choice2Of2.

| Choice2Of2 x -> Some x
| _ -> None
let inline chooser a = match a with
| Choice1Of2 x -> Some x
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choice2Of2

| Choice2Of2 x -> Some x
| _ -> None
let inline chooser a = match a with
| Choice1Of2 x -> Some x
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choice2Of2

@sergey-tihon
Copy link
Member

sergey-tihon commented Oct 23, 2021 via email

@sideeffffect sideeffffect mentioned this pull request Oct 23, 2021
@sideeffffect
Copy link
Contributor Author

The fix: #184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants