graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Data.List.Extended

Synopsis

Documentation

duplicates :: (Eq a, Hashable a) => [a] -> HashSet a Source #

uniques :: Ord a => [a] -> [a] Source #

getDifference :: (Eq a, Hashable a) => [a] -> [a] -> HashSet a Source #

getDifferenceOn :: (Eq k, Hashable k) => (v -> k) -> [v] -> [v] -> [v] Source #

getOverlapWith :: (Eq k, Hashable k) => (v -> k) -> [v] -> [v] -> [(v, v)] Source #

longestCommonPrefix :: Eq a => [[a]] -> [a] Source #

Returns the longest prefix common to all given lists. Returns an empty list on an empty list.

>>> longestCommonPrefix ["abcd", "abce", "abgh"]
"ab"
>>> longestCommonPrefix []
[]