Added last curried version

This commit is contained in:
rayhaneh
2018-05-30 12:48:20 -04:00
parent eacae91146
commit 951a2de52b
2 changed files with 7 additions and 3 deletions

View File

@@ -524,7 +524,8 @@ declare namespace R {
* elements.
*/
differenceWith<T>(pred: (a: T, b: T) => boolean, list1: ReadonlyArray<T>, list2: ReadonlyArray<T>): T[];
differenceWith<T>(pred: (a: T, b: T) => boolean): <T> (list1: ReadonlyArray<T>, list2: ReadonlyArray<T>) => T[];
differenceWith<T>(pred: (a: T, b: T) => boolean): (list1: ReadonlyArray<T>, list2: ReadonlyArray<T>) => T[];
differenceWith<T>(pred: (a: T, b: T) => boolean, list1: ReadonlyArray<T>): (list2: ReadonlyArray<T>) => T[];
/*
* Returns a new object that does not contain a prop property.

View File

@@ -1958,8 +1958,11 @@ class Rectangle {
const l2 = [{a: 3}, {a: 4}];
R.differenceWith(cmp, l1, l2); // => [{a: 1}, {a: 2}]
const differenceWithCurried = R.differenceWith(cmp);
differenceWithCurried(l1, l2); // =>[{a: 1}, {a: 2}]
const differenceWithCurried1 = R.differenceWith(cmp);
differenceWithCurried1(l1, l2); // =>[{a: 1}, {a: 2}]
const differenceWithCurried2 = R.differenceWith(cmp, l1);
differenceWithCurried2(l2); // =>[{a: 1}, {a: 2}]
};
() => {