From 1fff15175c87f28815c0cd344d29759dad85e5ca Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Sat, 19 Dec 2020 16:18:59 +0100 Subject: [PATCH] Fix typo in 2020 day 18 --- haskellAoC/src/Y2020/Day18.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskellAoC/src/Y2020/Day18.hs b/haskellAoC/src/Y2020/Day18.hs index 59b930f..16aa93a 100644 --- a/haskellAoC/src/Y2020/Day18.hs +++ b/haskellAoC/src/Y2020/Day18.hs @@ -19,7 +19,7 @@ evaluate input = fst $ foldl doOp (0, "") input doOp (res, "+") c = (res + (read c), "") doOp (res, "*") c = (res * (read c), "") doOp (res, "") c = (res, c) - doOp e c = error ("Invalid fold on " ++ show (e,c) ++ " in " ++ input) + doOp e c = error ("Invalid fold on " ++ show (e,c) ++ " in " ++ show input) -- Evaluate an expression (for part 2) by doing +'s first then calling P1 evaluate function evaluateP2 :: [String] -> Int