From: Neil Smith Date: Wed, 1 Dec 2021 22:12:58 +0000 (+0000) Subject: Removed arithmetic X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=381d729e524bc67b711ef3d1be1464d389731447;p=advent-of-code-21.git Removed arithmetic --- diff --git a/advent01/Main.hs b/advent01/Main.hs index a52bf9c..61b1a29 100644 --- a/advent01/Main.hs +++ b/advent01/Main.hs @@ -15,5 +15,4 @@ 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 (uncurry (>)) $ zip (tail nums) nums