packages feed

Unique 0.1.0.3 → 0.1.0.4

raw patch · 2 files changed

+9/−2 lines, 2 files

Files

Data/List/Unique.hs view
@@ -28,7 +28,7 @@ -- sortUniq "foo bar" == " abfor"  sortUniq :: Ord a => [a] -> [a]-sortUniq = nub . sort+sortUniq = sort . nub  filterByLength :: Ord a => (Int -> Bool) -> [a] -> [[a]] filterByLength p = filter (p . length) . group . sort@@ -39,6 +39,13 @@  repeated :: Ord a => [a] -> [a] repeated = map head . filterByLength (>1)++-- | The repeatedBy function behaves just like repeated, except it uses a user-supplied equality predicate.+-- +-- repeatedBy (>2) "This is the test line" == " eist"++repeatedBy :: Ord a => (Int -> Bool) -> [a] -> [a]+repeatedBy p = map head . filterByLength p  -- | 'unique' gets only unique elements, that do not have duplicates.   -- It sorts them. Example: 
Unique.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes --                   | | +----- non-breaking API additions --                   | | | +--- code changes with no API change-version:             0.1.0.3+version:             0.1.0.4  -- A short (one-line) description of the package. synopsis:           It provides the functionality like unix "uniq" utility