Merge pull request #487 from mayerwin/patch-1
[mono.git] / mcs / tests / test-anon-147.cs
1 using System;
2
3 static class C
4 {
5         public static Func<T1, Func<T2, Action<T3>>> Curry<T1, T2, T3> (this Action<T1, T2, T3> self)
6         {
7                 return value1 => value2 => value3 => self (value1, value2, value3);
8         }
9 }
10
11 class Test
12 {
13         public static int Main ()
14         {
15                 Action<int, int, int> test = (x, y, z) => {
16                         int i = x + y + z;
17                         Console.WriteLine (i);
18                         if (i != 19)
19                                 throw null;
20                 };
21                 Func<int, Func<int, Action<int>>> f = test.Curry ();
22
23                 f (3) (5) (11);
24
25                 return 0;
26         }
27 }