From e64db21f9e97cb4a3fe082b8904693a9b96f9d4f Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Tue, 3 May 2016 05:17:20 -0400 Subject: [PATCH] Point-free filter lambdas --- src/Unused/Types.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Unused/Types.hs b/src/Unused/Types.hs index 8bb6873..da4d06a 100644 --- a/src/Unused/Types.hs +++ b/src/Unused/Types.hs @@ -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 =