scalaz/scalaz-stream — pull request #67 by fthomas (2013-12-19 18:46:43+00:00)
Title: Add io.stdInLines for reading from standard input

This PR adds a `Process` for reading lines from standard input. Since `readLine` returns `null` when it reaches the end of the input stream, it's result is wrapped as `Option` so that the `Process` is terminated when `readLine` returns `null`.

Here is a simple example:

Process("What is your name?")
.append(io.stdInLines.once.map(name => s"Hello $name!"))
.through(io.stdOutLines).run.run

Which outputs

What is your name?
Frank
Hello Frank!

where the second line was typed in by me.