mirror of
https://github.com/joshuaclayton/unused.git
synced 2024-09-11 04:45:28 +03:00
Point-free filter lambdas
This commit is contained in:
parent
f5394e4b36
commit
e64db21f9e
@ -40,10 +40,10 @@ resultsFromMatches m =
|
||||
totalOccurrences' = sum $ fmap occurrences m
|
||||
|
||||
withOneFile :: ParseResponse -> ParseResponse
|
||||
withOneFile = fmap $ Map.filterWithKey (\_ a -> totalFiles a == 1)
|
||||
withOneFile = fmap $ Map.filterWithKey (const $ ((==) 1) . totalFiles)
|
||||
|
||||
withOneOccurrence :: ParseResponse -> ParseResponse
|
||||
withOneOccurrence = fmap $ Map.filterWithKey (\_ a -> totalOccurrences a == 1)
|
||||
withOneOccurrence = fmap $ Map.filterWithKey (const $ ((==) 1 ) . totalOccurrences)
|
||||
|
||||
listFromMatchSet :: TermMatchSet -> [(String, [TermMatch])]
|
||||
listFromMatchSet =
|
||||
|
Loading…
Reference in New Issue
Block a user