Ramda - Curry intersection

This commit is contained in:
Alexander James Phillips
2017-08-01 15:29:26 +01:00
parent 0df7e8bc93
commit 8fa64b11d0
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -754,6 +754,7 @@ declare namespace R {
* Combines two lists into a set (i.e. no duplicates) composed of those elements common to both lists.
*/
intersection<T>(list1: T[], list2: T[]): T[];
intersection<T>(list1: T[]): (list2: T[]) => T[];
/**
* Combines two lists into a set (i.e. no duplicates) composed of those
+3
View File
@@ -2241,3 +2241,6 @@ class Why {
R.intersperse(0, [1, 2]); // => [1, 0, 2]
R.intersperse(0, [1]); // => [1]
};
R.intersection([1, 2, 3], [2, 3, 3, 4]) // => [2, 3]
R.intersection([1, 2, 3])([2, 3, 3, 4]) // => [2, 3]