loadMtx :: String -> IO [[Double]] -- парсер loadMtx text = do delete [] (map (map(read)) ((map (delete "") (map (map (strip)) (map (Data.List.Split.splitOn " ") (splitOn ";" text)))))) main = do text <- readFile "matrix.txt" mtx <- loadMtx text putStrLn $ show $ mtx
Issues:
Couldn't match expected type `IO [Double]' with actual type `[[a0]]' In the return type of a call of `delete'
In general, I did not fully understand IO (), but there is a need to save the finished matrix, because I do not want to reread the file every time. How to do it?