You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Pipeline<S, E> is a commonly used IPipe<S, E>, but also a pipe that “wraps” another pipe or multiple sequential pipes. For this a pipeline takes an ordered list of pipes in its constructor. At runtime it connects these pipes, whereby the input of pipe n is connected to the output of pipe n-1. Note that the output type of pipe n-1 must be the same type as the input to pipe n and this is again checked at runtime. This idea is elucidated in the following diagram.
The benefit of using Pipelines is that it greatly reduces the complexity of a process and allows for easy reuse even in recursive ways. It is analogous, in many ways, to creating a function to wrap a body of code/instructions. As such, the function serves as a blackbox with input and output.
The following piece of code shows a example how to create a pipeline: