Let's say you have the following line of code:
var result = long.Parse(age);
You can refactor this to pipelines with the following
var inputPipe = new InputPipe<string>("age");
var parsePipe = inputPipe.ProcessFunction(long.Parse);
var collector = parsePipe.Collect();
inputPipe.Send("42");
var result = collector.SingleResult;
These will produce the same results.
Despite the complexity add of this code, this pattern has some advantages in refactoring to async as well has advantages in monitoring. It also has advantages in testing and visualization. For example the pipeline can render itself as the following dot file (Graphviz)