Skip to content

Commit

Permalink
lib: improve the implementation of the unique function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekleog committed Apr 12, 2019
1 parent 6b2bd33 commit 8319ead
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/lists.nix
Expand Up @@ -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.
Expand Down

0 comments on commit 8319ead

Please sign in to comment.