aboutsummaryrefslogtreecommitdiffstats
path: root/day16/main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'day16/main.hs')
-rw-r--r--day16/main.hs4
1 files changed, 0 insertions, 4 deletions
diff --git a/day16/main.hs b/day16/main.hs
index 76b3db1..56510ae 100644
--- a/day16/main.hs
+++ b/day16/main.hs
@@ -39,10 +39,6 @@ binaryToInt = reverse .> binaryToInt'
binaryToInt' [] = 0
binaryToInt' (x : xs) = digitToInt x + 2 * binaryToInt' xs
-takeUntil :: (a -> Bool) -> [a] -> [a]
-takeUntil _ [] = []
-takeUntil p (x : xs) = x : if p x then takeUntil p xs else []
-
applyOperator opTypeId subValues = case opTypeId of
0 -> sum subValues
1 -> product subValues