Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 483d82c85c
Fetching contributors…

Cannot retrieve contributors at this time

16 lines (13 sloc) 0.405 kB
module EulerUtil.Io
( applyFunctionToFile
, stringToIntArray
) where
applyFunctionToFile :: FilePath -> (String -> String) -> IO()
applyFunctionToFile fileName f = do
input <- readFile fileName
putStrLn $ f input
stringToIntArray :: String -> [[Int]]
stringToIntArray = stringArrayToIntArray . stringToArray
where
stringToArray = map words . lines
stringArrayToIntArray = map $ map read
Jump to Line
Something went wrong with that request. Please try again.