Skip to content

Commit 70c8e6b

Browse files
committed
remove redudancies
1 parent d4629bf commit 70c8e6b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

solutions/src/2025/10.hs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ Maintainer : [email protected]
2222
module Main (main) where
2323

2424
import Advent (format)
25-
import Data.Bits (xor, bit)
2625
import Data.Foldable (for_)
27-
import Data.List (elemIndices)
28-
import Data.Maybe (catMaybes, fromJust)
26+
import Data.Maybe (fromJust)
2927
import Data.SBV (SInteger, optLexicographic, free, minimize, (.==), (.>=), constrain, getModelValue)
3028
import Data.Traversable (for)
3129

@@ -65,10 +63,6 @@ cost (Node _ a b) =
6563
Nothing -> a'
6664
Just b' -> min a' (1 + b')
6765

68-
-- | Construct the integers by xoring together the bit given by index.
69-
xorBits :: [Int] -> Integer
70-
xorBits = foldl (\acc i -> acc `xor` bit i) 0
71-
7266
part2 :: ([Char], [[Int]], [Int]) -> IO Integer
7367
part2 (_, btns, jolt) =
7468
do

0 commit comments

Comments
 (0)