chi*_*ro2 2 haskell conduit haskell-pipes
我通过以下方式打开一些.txt文件:
main :: IO ()
main = do
xxs <- TIO.readFile pathToFile
return ()
Run Code Online (Sandbox Code Playgroud)
.txt文件的格式
str_1 \n str_2 \n ... str_m
Run Code Online (Sandbox Code Playgroud)
我想将xxs变成一个源代码,以便它看起来像:
sourceList [str_1, str_2, ..., str_m]
Run Code Online (Sandbox Code Playgroud)
管道API是否提供了一种方法来实现它而不首先进行一些字符串操作xxs,从而使其成为形式[str_1, str_2, ..., str_m]?