Removed arithmetic
[advent-of-code-21.git] / advent01 / Main.hs
index 9d627260e2887769b4e74d8f7546fcc94bac9b25..a52bf9c1a6bd597c69118aab6f859eb5eb1cb3af 100644 (file)
@@ -15,4 +15,5 @@ part2 nums = countIncreasing $ map sum windows
   where windows = filter ((== 3) . length) $ map (take 3) $ tails nums
 
 countIncreasing :: [Int] -> Int
-countIncreasing nums = length $ filter (> 0) $ zipWith (-) (tail nums) nums
+-- countIncreasing nums = length $ filter (> 0) $ zipWith (-) (tail nums) nums
+countIncreasing nums = length $ filter (uncurry (>)) $ zip (tail nums) nums