From 4892b3fcacce8d1b137adf0ebc79d6d11f6e440c Mon Sep 17 00:00:00 2001 From: shu Date: Wed, 4 Dec 2019 09:53:34 +0100 Subject: [PATCH] Still not completely on board with this --- 2019/day4/day4.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/2019/day4/day4.hs b/2019/day4/day4.hs index 181f33b..cf31af7 100644 --- a/2019/day4/day4.hs +++ b/2019/day4/day4.hs @@ -11,7 +11,4 @@ p x | nub x == x = False | otherwise = True -p' x - | sort x /= x = False - | 2 `elem` (map length $ group x) = True - | otherwise = False +p' x = 2 `elem` (map length $ group x) && p x