Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • D
auto temp = a;
a = b;
b = temp;
import std.algorithm.mutation : swap;
swap(a,b);
procedure swap(a, b: in out Integer)
is
    temp : Integer;
begin
    temp := a;
    a := b;
    b := temp;
end swap;

New implementation...
programming-idioms.org