Function pipe

Pipes the output of one stream into another, in order. The stream returned is a new stream which captures the final output.

If any stream in the pipe closes the whole pipe is closed.