From 1f63e23a5c72a2aa7589a002e54dbb75e7a033bb Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Fri, 16 Dec 2016 08:57:33 +0000 Subject: [PATCH] Tidying --- advent16.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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]] -- 2.34.1