Day eight
This commit is contained in:
17
day-08-haskell/app/Main.hs
Normal file
17
day-08-haskell/app/Main.hs
Normal file
@@ -0,0 +1,17 @@
|
||||
module Main (main) where
|
||||
|
||||
import System.Environment.Blank ( getArgs )
|
||||
import Task1 (task1)
|
||||
import Task2 (task2)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
args <- getArgs
|
||||
case args of
|
||||
["1", file] -> do
|
||||
input <- readFile file
|
||||
print $ task1 input
|
||||
["2", file] -> do
|
||||
input <- readFile file
|
||||
print $ task2 input
|
||||
_ -> error "Usage: <1|2> <input file>"
|
||||
Reference in New Issue
Block a user