using System;
// inspired by here: http://stackoverflow.com/a/3622173/420667
int Square(int x)
{
return x*x;
}
int Diff(int n, Func<int, int> f)
return f(n+1) - f(n);
Console.WriteLine(Diff(1, Square));
Console.WriteLine(Diff(1, (n) => Square(n)));