Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Unique
filterByLength :: Ord a => (Int -> Bool) -> [a] -> [[a]] Source
repeated :: Ord a => [a] -> [a] Source
repeated
finds only the elements that are present more than once in the list. Example:
repeated "foo bar" == "o"
repeatedBy :: Ord a => (Int -> Bool) -> [a] -> [a] Source
The repeatedBy function behaves just like repeated, except it uses a user-supplied equality predicate.
repeatedBy (>2) "This is the test line" == " eist"