This commit is contained in:
ctsk
2023-08-30 10:02:11 +02:00
parent 359aee0f22
commit 2ca20a6074
7 changed files with 1059 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ paths =
[ "./data/01.in"
, "./data/02.in"
, "./data/03.in"
, "./data/04.in"
]
solutions :: [(Int, Day, FilePath)]
@@ -19,14 +20,13 @@ solutions = zip3 [1 ..] (map head days) paths
runAll :: [(Int, Day, FilePath)] -> IO ()
runAll = mapM_ (\(dayNum, day, path) -> run day path >>= printDR dayNum)
header :: IO ()
header = putStrLn "[ Day ]------(1)-----+------(2)----"
usage :: IO ()
usage = putStrLn "./Main"
main :: IO ()
main =
getArgs >>= \case
["all"] -> header >> runAll solutions
_ -> header >> runAll [last solutions]
printHeader
>> getArgs
>>= \case
["all"] -> runAll solutions
_ -> runAll [last solutions]