In class/Microsoft.Build.Tasks:
[mcs.git] / tests / gtest-411.cs
blob8fb7deb1538060e2d6d4865ba84ed614c02baa10
1 using System;
3 static class Maybe
5 public static Maybe<T> C<T> (T value)
7 return null;
11 sealed class Maybe<T>
13 public Maybe (T value)
18 static class Extensions {
19 public static R Match<T,R>(this T self, params Func<T,Maybe<R>>[] matchers)
21 return default (R);
25 class Test {
26 public static void Main ()
28 Extensions.Match ("a", s => Maybe.C(s));
29 Extensions.Match ("a", s => Maybe.C(s), s => Maybe.C("a"));