Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-161.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6f119fa124f015020a8f6072c8b917b2f870f712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Compiler options: -r:gtest-161-lib.dll

public class App
{
	public static void Main ()
	{
		string s = apply<int, string> (3, delegate (int x) {
			return x.ToString ();
		});

		int y = apply<int, int> (3, FP.identity<int>);
	}

	static U apply<T, U> (T obj, FP.Mapping<T, U> f)
	{
		return f (obj);
	}
}