diff options
author | Julien Dessaux | 2024-07-10 00:01:54 +0200 |
---|---|---|
committer | Julien Dessaux | 2024-07-10 00:01:54 +0200 |
commit | 21cbb9f5fe57ac1003d19371e0ad927eae22cf76 (patch) | |
tree | e77c3e496647fba7b2ef5bbea565d853a1726656 /2023/20-Pulse_Propagation/first.hs | |
parent | 2023-20 part 1 in haskell (diff) | |
download | advent-of-code-21cbb9f5fe57ac1003d19371e0ad927eae22cf76.tar.gz advent-of-code-21cbb9f5fe57ac1003d19371e0ad927eae22cf76.tar.bz2 advent-of-code-21cbb9f5fe57ac1003d19371e0ad927eae22cf76.zip |
2023-20 part 2 in haskell
Diffstat (limited to '')
-rw-r--r-- | 2023/20-Pulse_Propagation/first.hs | 1 |
1 files changed, 0 insertions, 1 deletions
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 |