diff options
-rw-r--r-- | libraries/base/Data/List.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs index cc166d80de..c954757ddd 100644 --- a/libraries/base/Data/List.hs +++ b/libraries/base/Data/List.hs @@ -410,6 +410,8 @@ intersect = intersectBy (==) -- | The 'intersectBy' function is the non-overloaded version of 'intersect'. intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] +intersectBy _ [] _ = [] +intersectBy _ _ [] = [] intersectBy eq xs ys = [x | x <- xs, any (eq x) ys] -- | The 'intersperse' function takes an element and a list and |