From: Neil Smith Date: Tue, 6 Dec 2016 08:55:03 +0000 (+0000) Subject: Tidyied linebreaks X-Git-Url: https://git.njae.me.uk/?p=advent-of-code-16.git;a=commitdiff_plain;h=89d586750fc7153f025f2e867b1205fd188d83d8 Tidyied linebreaks --- diff --git a/advent04.hs b/advent04.hs index e48c257..135ad37 100644 --- a/advent04.hs +++ b/advent04.hs @@ -44,7 +44,8 @@ parseLine line = Room {name=name, sector=sector, checksum=checksum} countedLetters :: String -> [(Char, Int)] countedLetters name = sortBy sortCLetter $ unsortedCountedLetters name - where unsortedCountedLetters name = Map.toList $ Map.fromListWith (+) [(c, 1) | c <- filter (isLetter) name] + where unsortedCountedLetters name = + Map.toList $ Map.fromListWith (+) [(c, 1) | c <- filter (isLetter) name] sortCLetter :: (Char, Int) -> (Char, Int) -> Ordering sortCLetter (l1, n1) (l2, n2)