Logo Search packages:      
Sourcecode: nemerle version File versions  Download package

genericinst.cs

00001 class C1 <T> { }
00002 class C2 <T> { }
00003 class C3 <T> { }
00004 class C4 <T> { }

00006 class C5 <T> { }
00007 class C6 <T> { }
00008 class C7 <T> { }
00009 class C8 <T> { }

00011 class M {
  static int dupl<T> (int cnt, T unused)
  {
    if (cnt < 0)
      return 1;
    else
        return
      dupl (cnt - 1, new C1<T> ()) +
      dupl (cnt - 1, new C2<T> ()) +
      dupl (cnt - 1, new C3<T> ()) +
      dupl (cnt - 1, new C4<T> ()) +
      dupl (cnt - 1, new C5<T> ()) +
      dupl (cnt - 1, new C6<T> ()) +
      dupl (cnt - 1, new C7<T> ()) +
      dupl (cnt - 1, new C8<T> ());
  }

  public static void Main ()
  {
    string a = System.Environment.GetCommandLineArgs () [1];
    System.Console.WriteLine (dupl (int.Parse (a), "foo"));
  }
}

Generated by  Doxygen 1.6.0   Back to index