-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add R.containsBy #1353
add R.containsBy #1353
Conversation
|
||
describe('containsBy', function() { | ||
|
||
it('determines whether a projected list contains a projected value', function() { |
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.
Is "projected" the right word? I'm trying to suggest the mapping of a domain to a codomain.
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.
I think "projected" is perfect.
I have always found |
You're precisely defined I'm happy to deprecate |
Oh, didn't realize that. Must be because I want to use |
🌿 |
It seems we're comfortable deprecating |
If we only had
to
Idk. I think these two cases look very weird and would certainly not miss it. I think this (and other functions) should only be added from a real need users of ramda feel that they have. |
I agree. I suggest we open a separate pull request simply to deprecate |
We'll revisit this if there is demand for |
See #1349
R.containsWith
is usually used in conjunction with a function such as(a, b) => a.x === b.x
or(a, b) => f(a) === f(b)
(occurrences on GitHub).R.containsBy
would be more convenient in such cases.In the rare cases where the symmetry of
R.containsBy
is undesirable, one can always useR.any
. It's thus unnecessary to retainR.containsWith
.