From 2f1f4e38f75534c865340b8002ae23965a5f27a8 Mon Sep 17 00:00:00 2001 From: toastyandwarm Date: Sat, 7 Dec 2024 16:33:37 +0000 Subject: [PATCH] remove artefact from alternate method --- 7/solution.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7/solution.hs b/7/solution.hs index cc1cc6c..40ea294 100644 --- a/7/solution.hs +++ b/7/solution.hs @@ -31,7 +31,7 @@ solve2 [] = 0 solve2 ((_, []):xs) = solve2 xs solve2 ((a, (b:bs)):xs) = ((\x -> if x then 0 else a) $ null $ filter (==a) $ map (\fs -> (foldl' (flip ($)) b (zipWith flip fs bs))) (getOperators2 (length bs))) + solve2 xs -getOperators2 :: (Num a, Ord a, Show a, Read a) => Int -> [[(a -> a -> a)]] +getOperators2 :: (Num a, Show a, Read a) => Int -> [[(a -> a -> a)]] getOperators2 0 = [[]] getOperators2 x | x < 0 = [[]]