From a232c8c6996cd2b2aa77c8280aeeb96826310005 Mon Sep 17 00:00:00 2001 From: Abhinav Sarkar Date: Thu, 23 Aug 2012 15:34:33 +0530 Subject: [PATCH] Hlinted --- Cryptograms.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cryptograms.hs b/Cryptograms.hs index 3e9abb7..80fc922 100644 --- a/Cryptograms.hs +++ b/Cryptograms.hs @@ -72,9 +72,9 @@ scoreMappings dict tokens = -- finds maximum num mappings which have best scores for the given tokens. findBestMappings :: Dict -> Int -> [String] -> [Mapping] findBestMappings dict num tokens = let - mappings = (scoreMappings dict tokens) + mappings = scoreMappings dict tokens . S.toList - . foldl' (\mappings -> -- find num best num mappings + . foldl' (\mappings -> -- find the best num mappings S.fromList . take num . map fst . scoreMappings dict tokens . S.toList . findMappingsForToken dict mappings) @@ -91,7 +91,7 @@ findMappingsForToken dict mappings token = . reverse . sortBy (comparing M.size) . S.toList $ mappings of -- the token is already translatable. return current mappings. - Just dtoken -> trace (printf "Translated %s -> %s" token dtoken) $ mappings + Just dtoken -> trace (printf "Translated %s -> %s" token dtoken) mappings -- the token is not translatable yet. return current mappings merged -- with the mappings for the token.