diff --git a/GFramework.Core.Tests/functional/pipe/PipeExtensionsTests.cs b/GFramework.Core.Tests/functional/pipe/PipeExtensionsTests.cs index bdaa0ce..aca1386 100644 --- a/GFramework.Core.Tests/functional/pipe/PipeExtensionsTests.cs +++ b/GFramework.Core.Tests/functional/pipe/PipeExtensionsTests.cs @@ -66,21 +66,6 @@ public class PipeExtensionsTests int AddTwo(int x) => x + 2; } - /// - /// 测试Apply方法 - 验证函数能够正确应用到参数上 - /// - [Test] - public void Apply_Should_Apply_Function_To_Argument() - { - // Arrange - Func multiplyByTwo = x => x * 2; - - // Act - var result = multiplyByTwo.Apply(5); - - // Assert - Assert.That(result, Is.EqualTo(10)); - } /// /// 测试Also方法 - 验证执行操作后返回原值功能 diff --git a/GFramework.Core/functional/pipe/PipeExtensions.cs b/GFramework.Core/functional/pipe/PipeExtensions.cs index 8127b48..b636f33 100644 --- a/GFramework.Core/functional/pipe/PipeExtensions.cs +++ b/GFramework.Core/functional/pipe/PipeExtensions.cs @@ -59,32 +59,6 @@ public static class PipeExtensions Func first) => x => second(first(x)); - /// - /// Apply:将函数应用于值(柯里化辅助) - /// - /// 输入值的类型 - /// 函数返回结果的类型 - /// 要应用的函数 - /// 要传递给函数的输入值 - /// 函数执行后的结果 - public static TResult Apply( - this Func func, - TSource value) - => func(value); - - /// - /// On:将值应用于函数(与Apply功能相同,但参数顺序相反) - /// - /// 输入值的类型 - /// 函数返回结果的类型 - /// 要传递给函数的输入值 - /// 要应用的函数 - /// 函数执行后的结果 - public static TResult On( - this TSource value, - Func func) - => func(value); - /// /// Also:执行操作并返回原值 ///