@@ -642,7 +642,7 @@ rec {
642642 unique [ 3 2 3 4 ]
643643 => [ 3 2 4 ]
644644 */
645− unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [];
645+ unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [];
646646
647647 /* Intersects list 'e' and another list. O(nm) complexity.
648648
@@ -663,9 +663,6 @@ rec {
663663 /* Test if two lists have no common element.
664664 It should be slightly more efficient than (intersectLists a b == [])
665665 */
666− mutuallyExclusive = a: b:
667− (builtins.length a) == 0 ||
668− (!(builtins.elem (builtins.head a) b) &&
669− mutuallyExclusive (builtins.tail a) b);
666+ mutuallyExclusive = a: b: length a == 0 || !(any (x: elem x a) b);
670667
671668}