On 12/03/2015 06:19 PM, Timon Gehr wrote: > > void partialSort(alias less="a<b",R,S)(R r,S s) /+if(...)+/ > { topN!less(chain(r,s),r.length); sort!less(r); } Again this is suboptimal - should use two ranges, not chain. -- Andrei