xxxxxxxxxx
import std.stdio;
import std.array;
import std.algorithm;
class Foo
{
int a;
this(int b) { a = b; }
}
void main()
{
Foo[] foo;
foreach (int i; 0 .. 3) foo ~= new Foo(i);
foreach (int i; 0 .. 3) foo ~= new Foo(i);
writeln(foo.uniq!"a.a == b.a".map!(f => f.a));
}