1
0
Fork 0
advent-of-code/2017/app/Main.hs

21 lines
529 B
Haskell
Raw Normal View History

2022-12-04 14:01:02 -05:00
module Main where
import System.Environment
import AdventOfCode
unknown args = \_ -> "No program for arguments: " ++ show args
selectProgram ["1", "1"] = captcha1
selectProgram ["1", "2"] = captcha2
selectProgram ["2", "1"] = checksum
selectProgram ["2", "2"] = sumEvenlyDivisibleValues
selectProgram ["3", "1"] = distanceToAddress
selectProgram ["4", "1"] = day41
selectProgram ["4", "2"] = day42
selectProgram ["5", "1"] = day51
selectProgram args = unknown args
main = do
args <- getArgs
interact $ selectProgram args