Skip to content

Commit

Permalink
add chipper to all package.json files, fix some obvious package.json …
Browse files Browse the repository at this point in the history
  • Loading branch information
lolocake committed Jan 31, 2023
1 parent cfbe0fc commit d18fc74
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion Numerics/Functional Extensions/Composition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -645,4 +645,42 @@ public static Func<TDomain1, TDomain2, TDomain3, TEndResult> Compose<TDomain1, T
/// <typeparam name="TDomain1">The data type of the first parameter.</typeparam>
/// <typeparam name="TDomain2">The data type of the second parameter.</typeparam>
/// <typeparam name="TDomain3">The data type of the thrid parameter.</typeparam>
/// <typeparam name="TDomain4">The data type of the fourth parameter.
/// <typeparam name="TDomain4">The data type of the fourth parameter.</typeparam>
/// <typeparam name="TIR1">The type of the I r1.</typeparam>
/// <typeparam name="TIR2">The type of the I r2.</typeparam>
/// <typeparam name="TIR3">The type of the I r3.</typeparam>
/// <typeparam name="TIR4">The type of the I r4.</typeparam>
/// <typeparam name="TEndResult">The type of the end result.</typeparam>
/// <param name="func1">The first functional.</param>
/// <param name="func2">The second functional.</param>
/// <param name="func3">The third functional.</param>
/// <param name="func4">The fourth functional.</param>
/// <param name="func5">The fifth functional.</param>
/// <returns></returns>
public static Func<TDomain1, TDomain2, TDomain3, TDomain4, TEndResult> Compose<TDomain1, TDomain2, TDomain3, TDomain4, TIR1, TIR2, TIR3, TIR4, TEndResult>(
this Func<TDomain1, TDomain2, TDomain3, TDomain4, TIR1> func1, Func<TIR1, TIR2> func2, Func<TIR2, TIR3> func3, Func<TIR3, TIR4> func4, Func<TIR4, TEndResult> func5)
{
return (p1, p2, p3, p4) => func5(func4(func3(func2(func1(p1, p2, p3, p4)))));
}

/// <summary>
/// Composition of the given functionals.
/// </summary>
/// <typeparam name="TDomain1">The data type of the first parameter.</typeparam>
/// <typeparam name="TDomain2">The data type of the second parameter.</typeparam>
/// <typeparam name="TDomain3">The data type of the thrid parameter.</typeparam>
/// <typeparam name="TDomain4">The data type of the fourth parameter.</typeparam>
/// <typeparam name="TDomain5">The data type of the fifth parameter.</typeparam>
/// <typeparam name="TIR1">The type of the I r1.</typeparam>
/// <typeparam name="TIR2">The type of the I r2.</typeparam>
/// <typeparam name="TIR3">The type of the I r3.</typeparam>
/// <typeparam name="TIR4">The type of the I r4.</typeparam>
/// <typeparam name="TEndResult">The type of the end result.</typeparam>
/// <param name="func1">The first functional.</param>
/// <param name="func2">The second functional.</param>
/// <param name="func3">The third functional.</param>
/// <param name="func4">The fourth functional.</param>
/// <param name="func5">The fifth functional.</param>
/// <returns></returns>
public static Func<TDomain1, TDomain2, TDomain3, TDomain4, TDomain5, TEndResult> Compose<TDomain1, TDomain2, TDomain3, TDomain4, TDomain5, TIR1, TIR2, TIR3, TIR4, TEndResult>(

0 comments on commit d18fc74

Please sign in to comment.