[plug] qsort

Cameron Patrick cp at chem.com.au
Mon Jun 10 16:31:36 WST 2002


On Mon, Jun 10, 2002 at 01:34:55PM +0800, The Thought Assassin wrote:
> 
> qsort lt []     = []
> qsort lt (x:xs) = qsort lt y ++ [x] ++ qsort lt z
>                   where (y,z) = partition (lt x) xs
> 
> Now that is a thing of beauty.
> 

Ahh... Haskell... are you a UWA student by any chance?  ;)

Here's a challenge: rewrite my bogosort in Haskell using monads.

CP.



More information about the plug mailing list