title: How to implement true function pipeline in C#?
body: <p>How to create a true function pipeline using C#? I got some idea like as follows, but it is not a true pipeline</p>
  
  <pre><code>public static IEnumerable&lt;T&gt; ForEachPipeline&lt;T&gt;(this IEnumerable&lt;T&gt; source, params Func&lt;T, T&gt;[] pipeline)
  {
   foreach (var element in source) {
    yield return ExecutePipeline(element, pipeline);
   }
  }
  
  private static T ExecutePipeline&lt;T&gt;(T element, IEnumerable&lt;Func&lt;T, T&gt;&gt; jobs)
  {
   var arg = element;
   T result = default(T);
   foreach (var job in jobs) {
    result = job.Invoke(arg);
    arg = result;
   }
   return result;
  }
  </code></pre>
  
  <p>In the above code each element of <code>IEnumerable&lt;T&gt;</code> would able to get into the pipeline only after the previous element finishes executing all the functions (i.e. exits the pipeline), but according to the definition if <code>element1</code> finishes executing <code>func1</code> and start executing <code>func2</code>, by that time <code>element2</code> should start executing <code>func1</code> and so on thus maintaining continues flow of data in the pipeline.</p>
  
  <p>Is this kind of scenario possible to implement in C#? If possible please give me some example code.</p>