Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • D
int square(int x) {
   return x*x;
}
alias fun = (in a){return a * a;};

Using a delegate literal.
function Square (X : Integer) return Integer is
begin
   return X * X;
end Square;

New implementation...
< >
programming-idioms.org