From: Neil Smith Date: Fri, 16 Dec 2016 08:57:33 +0000 (+0000) Subject: Tidying X-Git-Url: https://git.njae.me.uk/?p=advent-of-code-16.git;a=commitdiff_plain;h=1f63e23a5c72a2aa7589a002e54dbb75e7a033bb Tidying --- diff --git a/advent16.hs b/advent16.hs index 80474b5..0c7bfbb 100644 --- a/advent16.hs +++ b/advent16.hs @@ -32,10 +32,7 @@ checksum :: String -> String checksum digits | odd $ length digits = digits | otherwise = checksum $ map (checksumPair) $ pairs digits - - -checksumPair :: String -> Char -checksumPair p = if (length $ nub p) == 1 then '1' else '0' + where checksumPair p = if (length $ nub p) == 1 then '1' else '0' pairs :: [a] -> [[a]]