On Monday, 8 February 2016 at 23:25:00 UTC, Andrei Alexandrescu
wrote:
Consider defining a function that partitions a range around a
given index like this:
size_t pivotPartition(alias less = (a, b) => a < b, Range)
(Range r, size_t pivot);
Returns x, one of the the indexes that r[pivot] would
Consider defining a function that partitions a range around a given
index like this:
size_t pivotPartition(alias less = (a, b) => a < b, Range)
(Range r, size_t pivot);
Returns x, one of the the indexes that r[pivot] would have if r were
sorted. Also, r[0 .. x] contains stuff no greater than