Example #1
0
 private static Pipe <R> RunStep <T, R>(this Pipe <T> pipe, Some <Title> title, Func <T, Task <R> > step) =>
 RunStep(pipe, title, TaskFunctions.Run(step));
 /// <summary>
 /// Projects from one value to another.
 /// <remarks>A failure to map will impact the current step as if this happened in the step itself.</remarks>
 /// </summary>
 /// <typeparam name="T">Current type</typeparam>
 /// <typeparam name="R">Type of the resulting value</typeparam>
 /// <param name="pipe">The <see cref="Pipe{T}"/> instance to perform this operation on.</param>
 /// <param name="map">A function to map the current value to its new value.</param>
 /// <returns>A new <see cref="Pipe{T}"/> instance of the destination type</returns>
 public static Pipe <R> Map <T, R>(this Pipe <T> pipe, Func <T, Task <R> > map) =>
 pipe.Map(TaskFunctions.Run(map));