intersect -containers

intersect :: Eq a => [a] -> [a] -> [a]
base Data.List
The intersect function takes the list intersection of two lists. For example, > [1,2,3,4] `intersect` [2,4,6,8] == [2,4] If the first list contains duplicates, so will the result. > [1,2,2,3,4] `intersect` [6,4,4,2] == [2,2,4] It is a special case of intersectBy, which allows the programmer to supply their own equality test.
intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
base Data.List
The intersectBy function is the non-overloaded version of intersect.
intersectFileModes :: FileMode -> FileMode -> FileMode
unix System.Posix.Files.ByteString, unix System.Posix.Files
Combines two file modes into one that only contains modes that appear in both.