properly drop mutually-referring declarations that are not otherwise

referenced and have no side effects
This commit is contained in:
Mihai Bazon
2012-09-23 12:47:34 +03:00
parent 76d88b59dc
commit a83b28503f
5 changed files with 137 additions and 67 deletions

View File

@@ -190,3 +190,15 @@ function mergeSort(array, cmp) {
};
return _ms(array);
};
function set_difference(a, b) {
return a.filter(function(el){
return b.indexOf(el) < 0;
});
};
function set_intersection(a, b) {
return a.filter(function(el){
return b.indexOf(el) >= 0;
});
};