Another fun one: partialSort with two ranges

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 3 11:12:01 PST 2015


On 12/03/2015 02:09 PM, Andrei Alexandrescu wrote:
> Yah, please convert to pull request. Using two ranges is just beautiful.
> Thanks! -- Andrei

I should add that the use of chain is liable to be quite a bit less 
efficient - it's one of those "hamburger into cow" cases.

The right way to go about this is redo partialSort with two ranges, then 
have the current signature with range and size_t forward to it: 
partialSort(r[0 .. n], r[n + 1 .. $]). -- Andrei


More information about the Digitalmars-d mailing list