intersect -> intersectLists, subtract -> subtractLists

This commit is contained in:
Eelco Dolstra 2015-03-04 22:11:47 +01:00
parent 97fcb33ac2
commit 694f01db2d
2 changed files with 4 additions and 4 deletions

View File

@ -234,8 +234,8 @@ rec {
in [x] ++ remove x xs; in [x] ++ remove x xs;
# Intersects list 'e' and another list # Intersects list 'e' and another list
intersect = e: filter (x: elem x e); intersectLists = e: filter (x: elem x e);
# Subtracts list 'e' from another list # Subtracts list 'e' from another list
subtract = e: filter (x: !(elem x e)); subtractLists = e: filter (x: !(elem x e));
} }

View File

@ -67,9 +67,9 @@ let
if filterPlatforms == [] then platforms if filterPlatforms == [] then platforms
else else
if hasPrefix "!" entry then if hasPrefix "!" entry then
subtract (intersect filterPlatforms nodejs.meta.platforms) platforms subtractLists (intersectLists filterPlatforms nodejs.meta.platforms) platforms
else else
platforms ++ (intersect filterPlatforms nodejs.meta.platforms) platforms ++ (intersectLists filterPlatforms nodejs.meta.platforms)
) [] os; ) [] os;
mapDependencies = deps: f: rec { mapDependencies = deps: f: rec {