foreach (const i, const a; r)
{
for (auto j = i + 1; j < r.length; ++j)
{
const b = r[j];
// Use a and b
}
}excluding self-pairs, that is i != j
foreach (const i, const a; r)
{
for (auto j = i + 1; j < r.length; ++j)
{
const b = r[j];
// Use a and b
}
}excluding self-pairs, that is i != j