-
Notifications
You must be signed in to change notification settings - Fork 58
MetaPipes
A metapipe is a pipe “wraps” another pipe. MetaPipes are useful in that they can make decisions based upon the behavior of the pipe(s) they wrap. There are numerous metapipes and this section will discuss a few of the more interesting cases. Moreover, by understanding the cases in which these pipes are used, its possible to create metapipes when such situations make themselves apparent.
A Pipeline
is a commonly used pipe. A Pipeline<S,E>
implements Pipe<S,E>
and as such, a Pipeline
is simply a Pipe
. A Pipeline
takes an ordered list of pipes in its constructor. It connects these pipes, whereby the input of pipe n
is connected to the output of pipe n-1
. The benefit of using a Pipeline
is that is greatly reduces the mental complexity of a process. It is analogous, in many ways, to creating a function to wrap a complex body of code. As such, the function serves as a blackbox with input and output.