Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
9
Task/Currying/C-sharp/currying.cs
Normal file
9
Task/Currying/C-sharp/currying.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
public delegate int Plus(int y);
|
||||
public delegate Plus CurriedPlus(int x);
|
||||
public static CurriedPlus plus =
|
||||
delegate(int x) {return delegate(int y) {return x + y;};};
|
||||
static void Main()
|
||||
{
|
||||
int sum = plus(3)(4); // sum = 7
|
||||
int sum2= plus(2)(plus(3)(4)) // sum2 = 9
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue