Don't really need a separate function to fmap pharmacy

This commit is contained in:
Tissevert 2019-04-10 10:44:19 +02:00
parent d021155df2
commit b21cd8d909

View file

@ -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 ()