From cf7439ae6ead663c965e70df99f0733b2d1d6164 Mon Sep 17 00:00:00 2001 From: Neil Smith <NeilNjae@users.noreply.github.com> Date: Sun, 12 Jan 2025 11:14:41 +0000 Subject: [PATCH] Updated notes for day 24 investigation --- advent24/{notes.hs => notes.txt} | 3 +++ 1 file changed, 3 insertions(+) rename advent24/{notes.hs => notes.txt} (72%) diff --git a/advent24/notes.hs b/advent24/notes.txt similarity index 72% rename from advent24/notes.hs rename to advent24/notes.txt index 4f049a3..ec00b45 100644 --- a/advent24/notes.hs +++ b/advent24/notes.txt @@ -32,4 +32,7 @@ putStrLn $ unlines $ fmap show $ sortOn (codeOfName . head . inputs) $ device dc2 = replaceCarry 2 device +foldM (growSpine dc13) (Node {rootLabel = fromJust $ find ((== Carry) . gType) device, subForest = []}) [ (And, (Gate Xor [x0, y0] "")), (Or, (Gate And [x0, y0] "")), (Xor, (Gate Xor [x1, y1] "")) ] + +foldM (growSpine d21) (Node {rootLabel = fromJust $ find ((== Carry) . gType) d21, subForest = []}) [ (And, (Gate Xor ["x21", "y21"] "")), (Or, (Gate And ["x21", "y21"] "")), (Xor, (Gate Xor ["x22", "y22"] "")) ] -- 2.43.0