2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git] / tests / gtest-anon-47.cs
blob80fedb5a226fc9671f5c1d9d34f9a5ac55bd071e
1 using System;
3 static class C
5 public static Func<T1, Func<T2, Action<T3>>> Curry<T1, T2, T3> (this Action<T1, T2, T3> self)
7 return value1 => value2 => value3 => self (value1, value2, value3);
11 class Test
13 static int Main ()
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;
21 Func<int, Func<int, Action<int>>> f = test.Curry ();
23 f (3) (5) (11);
25 return 0;