Ben Jones:
auto sorter = (Tuple x, Tuple y) => x.get(0) < y.get(0); sort!sorter(zip(a,b));
You can write that as (untested):
zip(a, b).sort!((x, y) => x[0] < y[0]);
Or even just:
a.zip(b).sort!q{ a[0] < b[0] };
Bye,
bearophile
Ben Jones:
auto sorter = (Tuple x, Tuple y) => x.get(0) < y.get(0); sort!sorter(zip(a,b));
You can write that as (untested):
zip(a, b).sort!((x, y) => x[0] < y[0]);
Or even just:
a.zip(b).sort!q{ a[0] < b[0] };
Bye,
bearophile