The Beauty of a Perl Quicksort
Yet Another Misleading Title. :)
err...I have to say, (I can't remember the exact time I met this version of quicksort), ever since the Haskell version was born, there were (and still are) various implementations available in various languages. This version of quicksort is a very nature "translation" of what the algorithm is:
function quicksort(list) {
select a pivot;
return (quicksort([x|x<pivot]), pivot, quicksort([x|x>pivot]));
}
Today, I met this version again in ="http://www.reddit.com/r/lisp/comments/fe69b…