[plt-scheme] Quicksort in Scheme

From: Matt Jadud (mcj4 at kent.ac.uk)
Date: Wed Jan 4 14:07:31 EST 2006

I've always wondered: why does Scheme have cons, but not snoc? A point 
of history, a point of practicality, neither, or both?

M



Greg Woodhouse wrote:

> namely, the partition function creates sublists sorted in the wrong
> order
> 
> 
>>(partition 3 '(1 2 3 3 4 5 5 6))
> 
> ((2 1) (6 5 5 4 3 3))
> 
> I suppose I could use append, but doesn't that imply traversing the
> entire list for each element (giving me a quadratic sort)?


Posted on the users mailing list.