[Haskell-cafe] Quick Sort Algorithm

=?windows-1250?Q?Du=9Aan_Kol=E1=F8?= kolar at fit.vutbr.cz
Thu May 17 15:26:19 EDT 2007


What if the list is empty? You should take into account even this situation.

Dusan

PR Stanley wrote:
> Hi folks
> qSort (x:xs) =
>     qSort smaller ++ [x] ++ qSort larger
>     where
>     smaller = [a | a . xs, a x ]
>     larger = [b | b . xs, b > x ]
> Any idea why I can't get this to work?
> Thanks,
> Paul
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list