var zipCodePipe = new InputPipe<ZipCode>("zipCode");
var peanutButtersPipe = zipCodePipe.ProcessFunction(PeanutButterShop.GetAvailable);
var jelliesPipe = zipCodePipe.ProcessFunction(JellyShop.GetAvailable);
var bestSandwichPipe = peanutButtersPipe.JoinTo(jelliesPipe)
.Process((p, j) => Sandwich.Create(p.BestPeanutButter, j.BestJelly));
var bestSandwichCollector = bestSandwichPipe.Collect();
No comments:
Post a Comment