I had the need to create an async pipeline that consisted of actions (methods) composing over each other. I also wanted the construction of this pipeline to not generate any side effects, including Exceptions, Object state mutations, IO operations, etc. I had the need for function composition and Monadic Composition (Kleisli Composition), and did not want to use Task.Run, I do not like doing that in ASP.NET applications.
Having worked in JavaScript with the IO Monad, I decided to do something similar in C# that would fulfill my needs. In here, I leave the implementation I've come up so far with, and below, a simple code example that shows how to use it, plus some other code for the sake of completeness.
@benrobot I love Reactive Programming, I have used it for a few years now and I am an advocate for it. In fact, I like it so much that wrote two articles about it. That being said, it is often a style that does not mix well with other styles, I think that is the only thing that some people (certainly not me) have against it. I think the approach shown here can be better mingled with other code styles.