Commit afca0b6c authored by mnay1u19's avatar mnay1u19
Browse files

modified readCSV

parent 480483d1
...@@ -9,7 +9,7 @@ readCSV fname = do ...@@ -9,7 +9,7 @@ readCSV fname = do
return $ readCSVString str return $ readCSVString str
readCSVString :: String -> [[String]] readCSVString :: String -> [[String]]
readCSVString whole = [splitElem ',' (line++" ") | line <- splitElem '\n' whole] readCSVString whole = [splitElem ',' (line++" " ) | line <- splitElem '\n' whole]
splitElem :: Eq a => a -> [a] -> [[a]] splitElem :: Eq a => a -> [a] -> [[a]]
splitElem elem = split (/=elem) splitElem elem = split (/=elem)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment