From: Ramakrishnan Muthukrishnan Date: Tue, 17 Feb 2015 09:37:56 +0000 (+0530) Subject: cute hlint suggestion for transformng a function X-Git-Url: https://git.rkrishnan.org/Site/Content/Exhibitors/specifications/reliability?a=commitdiff_plain;h=4628ebad53536132ed5ead2027276af35bc5aa59;p=functorrent.git cute hlint suggestion for transformng a function --- diff --git a/src/Bencode.hs b/src/Bencode.hs index 6b46a92..1fe6aea 100644 --- a/src/Bencode.hs +++ b/src/Bencode.hs @@ -132,6 +132,6 @@ encode (Bstr bs) = let s = BC.unpack bs in show (length s) ++ ":" ++ s encode (Bint i) = "i" ++ show i ++ "e" encode (Blist xs) = "l" ++ encodeList xs ++ "e" - where encodeList = foldr (\x -> (++ encode x)) "" + where encodeList = foldr ((++) . encode) "" encode (Bdict d) = "d" ++ encodeDict d ++ "e" where encodeDict m = concat [encode k ++ encode (m M.! k) | k <- M.keys m]