From b21cd8d90979d6302363e8a2588779357b8d7bf6 Mon Sep 17 00:00:00 2001 From: Tissevert Date: Wed, 10 Apr 2019 10:44:19 +0200 Subject: [PATCH] Don't really need a separate function to fmap pharmacy --- src/Main.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 91b196f..7d74f63 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -15,14 +15,11 @@ readCSV filePath = do Left e -> (putStrLn $ show e) >> exitFailure Right rows -> return rows -getPharmacy :: String -> IO Pharmacy -getPharmacy = fmap pharmacy . readCSV - getCurrentState :: IO State getCurrentState = currentState <$> (utctDay <$> getCurrentTime) - <*> getPharmacy "medicine.csv" + <*> (pharmacy <$> readCSV "medicine.csv") <*> readCSV "timeline.csv" main :: IO ()