public void LambdaWith2ParametersCanBeCurried() { var curriedLambda = FunctionExtensions.Curry((int v1, string v2) => Tuple.Create(v1, v2)); var result = curriedLambda(5)("five"); Assert.Equal(Tuple.Create(5, "five"), result); }
public void StaticMethodWith2ParametersCanBeCurried() { var curriedMethod = FunctionExtensions .Curry <int, string, object>(MethodWithTwoParameters); var result = curriedMethod(5)("five"); Assert.Equal(Tuple.Create(5, "five"), result); }
public void DelegateWith2ParametersCanBeCurried() { var curriedDelegate = FunctionExtensions .Curry <int, string, object>(DelegateWithTwoParamaters.Invoke); var result = curriedDelegate(5)("five"); Assert.Equal(Tuple.Create(5, "five"), result); }