Day eleven
This commit is contained in:
16
day-11-haskell/app/Main.hs
Normal file
16
day-11-haskell/app/Main.hs
Normal file
@@ -0,0 +1,16 @@
|
||||
module Main (main) where
|
||||
|
||||
import System.Environment.Blank ( getArgs )
|
||||
import Lib (task1, 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