Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- duplicates :: (Eq a, Hashable a) => [a] -> HashSet a
- uniques :: Ord a => [a] -> [a]
- getDifference :: (Eq a, Hashable a) => [a] -> [a] -> HashSet a
- getDifferenceOn :: (Eq k, Hashable k) => (v -> k) -> [v] -> [v] -> [v]
- getOverlapWith :: (Eq k, Hashable k) => (v -> k) -> [v] -> [v] -> [(v, v)]
- longestCommonPrefix :: Eq a => [[a]] -> [a]
- appendToNonEmpty :: NonEmpty a -> [a] -> NonEmpty a
Documentation
duplicates :: (Eq a, Hashable a) => [a] -> HashSet 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 []
[]
appendToNonEmpty :: NonEmpty a -> [a] -> NonEmpty a Source #