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> 

猜你喜欢

转载自www.cnblogs.com/zwvista/p/9314824.html