lib: improve the implementation of the unique function

This commit is contained in:
Léo Gaspard 2019-04-12 20:08:29 +02:00
parent 6b2bd330fa
commit 8319ead594

View File

@ -633,8 +633,7 @@ rec {
else
let
x = head list;
xs = unique (drop 1 list);
in [x] ++ remove x xs;
in [x] ++ unique (remove x list);
/* Intersects list 'e' and another list. O(nm) complexity.