From: Neil Smith Date: Mon, 19 Dec 2022 11:27:36 +0000 (+0000) Subject: Tidying X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=ba1fb8a459ef5514a246e66557fab4507824918e;p=advent-of-code-22.git Tidying --- diff --git a/advent17/Main.hs b/advent17/Main.hs index 7c2b4d3..57794a9 100644 --- a/advent17/Main.hs +++ b/advent17/Main.hs @@ -42,10 +42,9 @@ main = print $ part2 oneJetCycle part1, part2 :: [Position] -> Int -part1 oneJetCycle = rocksHeight final -- fromMaybe -1 $ maximumOf (folded . _y) (final ^. chamber) - where final = simulate mkRocks (cycle oneJetCycle) 2022 +part1 oneJetCycle = rocksHeight $ simulate mkRocks (cycle oneJetCycle) 2022 -part2 oneJetCycle = calculatedHeight -- (cycleStartState, cycleRepeatState) +part2 oneJetCycle = calculatedHeight where initState = SimulationState { _chamber = S.empty , _jets = (cycle oneJetCycle)