-
-
Notifications
You must be signed in to change notification settings - Fork 31
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 DifferenceWith #71
Comments
Could you describe it more specifically? for example, a signature for the function, and desired behavior. |
It would accept a function like such https://ramdajs.com/docs/#differenceWith because difference works only with primitives. |
I got this. |
maybe a //current implementation(which is same as ramda's signature)
A.differenceWith<{a:number}>([{a:1},{a:2}], [{a:1},{a:3}], ({a:x}, {a:y})=> x === y)
A.differenceWith([{a:1},{a:2}], [{a:1},{a:3}], F.equals) // which should work just same as A.difference //proposed implementation
A.differenceWith<{a:number},number>([{a:1},{a:2}], [{a:1},{a:3}], D.getExn('a'))
A.differenceWith([{a:1},{a:2}], [{a:1},{a:3}], F.identity) // which should work just same as A.difference this makes the third argument into a unary function, which works fluently with many other functions in ts-belt. the PR is written in ramda's signature, but let me know how do you think. |
I don't think I have anything against the proposal |
Great! PR updated! |
Useful for array of objects
The text was updated successfully, but these errors were encountered: