Pipelining
Pipelining and composition are techniques for setting up functions to work in sequence, so the output from a function becomes the input to the next function. There are two ways of looking at this: from a computer point of view and from a mathematical point of view. Usually, most FP texts start with the latter, but since I assume that most readers are closer to computers than to math, let's start with the former.
Piping in Unix/Linux
In Unix/Linux, the execution of a command and passing its output as an input to a second command, whose output will yet the input of a third command, and so on, is called a pipeline. This is quite common, and an application of the philosophy of Unix, as explained in a Bell Laboratories article, written by the creator of the pipelining concept himself, Doug McIlroy:
- Make each program do one thing well. To do a new job, build afresh rather than complicating old programs by adding new features.
- Expect the output of every program to become the input to another...