From 21cbb9f5fe57ac1003d19371e0ad927eae22cf76 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 10 Jul 2024 00:01:54 +0200 Subject: 2023-20 part 2 in haskell --- 2023/20-Pulse_Propagation/first.hs | 1 - 1 file changed, 1 deletion(-) (limited to '2023/20-Pulse_Propagation/first.hs') diff --git a/2023/20-Pulse_Propagation/first.hs b/2023/20-Pulse_Propagation/first.hs index c43e332..8704be9 100644 --- a/2023/20-Pulse_Propagation/first.hs +++ b/2023/20-Pulse_Propagation/first.hs @@ -61,7 +61,6 @@ compute input = let (x, y) = computeX 1000 (0, 0) $ initConjuctions input in x * computeX i n input = let (n', input') = compute' (1, 0) [("button", Low, "broadcaster")] input in computeX (i-1) (scoreAdd n n') input' compute' :: (Int, Int) -> [(String, Pulse, String)] -> Input -> ((Int, Int), Input) - compute' n [] input = (n, input) compute' n signals input | length stepAll == 0 = (n, input) | otherwise = compute' (scoreAdd n $ score stepAll) stepAll alterAll where -- cgit v1.2.3