Haskell语言学习笔记(83)Pipes

时间:2023-03-10 06:01:09
Haskell语言学习笔记(83)Pipes

安装 pipes

$ cabal install pipes
Installed pipes-4.3.9
Prelude> import Pipes
Prelude Pipes> import qualified Pipes.Prelude as P
Prelude Pipes P>

Pipes

Pipes 是一个处理流的库。

Prelude Pipes P> runEffect $ P.stdinLn >-> P.takeWhile (/= "quit") >-> P.stdoutLn
Test
Test
Apple
Apple
quit
Prelude Pipes P>