This seems to be the Haskell equivalent
    Andrei Alexandrescu 
    SeeWebsiteForEmail at erdani.org
       
    Mon Dec 21 19:10:46 PST 2009
    
    
  
Pelle Månsson wrote:
> On 12/22/2009 01:16 AM, Nick Sabalausky wrote:
>> It's already been pointed out in a number of places that that's not
>> quicksort. Quicksort is in-place and doesn't use the head as the pivot.
>> Besides "It probably performs like a bitch" defeats the whole point of
>> quicksort, doesn't it? And, going along with what Andrei pointed out in
>> another thread, it's hard call a piece of code "beautiful" if it's either
>> flat-out wrong or otherwise defeats its own point.
> 
> It does however display the idea behind quicksort quite nicely: pivot, 
> sort the larger and smaller portions of the array separately. The rest 
> is just optimization.
I disagree. Partition is quintessential to quicksort.
Andrei
    
    
More information about the Digitalmars-d
mailing list