add catOptions and equalsWith functions for seq, list, array and map by sideeffffect · Pull Request #64 · fsprojects/FSharpx.Collections · GitHub
Skip to content

add catOptions and equalsWith functions for seq, list, array and map#64

Merged
forki merged 5 commits into
fsprojects:masterfrom
sideeffffect:master
Apr 25, 2017
Merged

add catOptions and equalsWith functions for seq, list, array and map#64
forki merged 5 commits into
fsprojects:masterfrom
sideeffffect:master

Conversation

@sideeffffect

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/FSharpx.Collections/Collections.fs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

where is the difference to Seq.choose id?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

none, the point is to have one function that does this, so that you don't have to compose two other to do the job (like in Haskell catMaybes)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(Seq.choose id) is also one function and can be composed!?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, but that's already two variables that have to have parentheses around them -- catOptions is supposed to be only a small helper function, I wrote it because I've found myself writing (Seq.choose id) way to often. DRY

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can rewrite them in terms of (choose id) if you think that would be better

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

mmm tbh I don't really agree gere. But maybe we find others that can join discussion

@sideeffffect sideeffffect changed the title add catOptions functions for seq, list and array add catOptions and equalsWith functions for seq, list, array and map Sep 8, 2016
@sideeffffect

Copy link
Copy Markdown
Contributor Author

I've implemented the catOptionss using choose id and inlined them -- I hope that makes them acceptable now
I've also added equalsWith and helpers for Choice

@forki could you also please have a look at fsprojects/ProjectScaffold#270 and fsprojects/FSharpx.Async#31 ? others seem to be a bit passive. Thank you very much!

@sideeffffect

Copy link
Copy Markdown
Contributor Author

@tpetricek could you please have a look at this?

@sideeffffect

Copy link
Copy Markdown
Contributor Author

@forki @mausch @panesofglass @tpetricek
it contains some useful helper functions that I would like to use from FSharpx.Collections
can we please merge this?

@forki forki merged commit b1df059 into fsprojects:master Apr 25, 2017
@forki

forki commented Apr 25, 2017

Copy link
Copy Markdown
Member

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.

2 participants