class lis {}
abstract class fn {
public abstract r apply (a x,b y);
}
class fn1 : fn ,lis,lis>
{
public override lis apply (lis x,lis y)
{
return M.RevAppend (x,y);
}
}
class M {
public static b FoldLeft (a x, b acc, fn f)
{
return f.apply (x, acc);
}
public static lis RevAppend (lis x , lis y) {
return x;
}
public static lis > Concat (lis > l)
{
return FoldLeft>, lis>> (l, new lis> (), new
fn1> ());
}
public static void Main ()
{
M.Concat (new lis> ());
}
}