Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
slightly more clean day 15
Browse files Browse the repository at this point in the history
  • Loading branch information
mstksg committed Dec 15, 2023
1 parent f3f7b5c commit 91046e5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/AOC/Challenge/Day15.hs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,8 @@ initBox label n = B (NEM.singleton label (BN n Nothing Nothing)) label label
traceBox :: Box -> [(String, Int)]
traceBox B {..} = go _bFirst
where
go x = case _bnAfter of
Nothing -> [out]
Just y -> out : go y
go x = (x, _bnValue) : maybe [] go _bnAfter
where
out = (x, _bnValue)
BN {..} = _bMap NEM.! x

day15b :: [(String, Act)] :~> Int
Expand Down

0 comments on commit 91046e5

Please sign in to comment.