Serves me right, should have tested the code before I submitted it. Just s/span/partition/ and it should work.
380 karma · joined April 7, 2008
quicksort (x:xs) = let (a, b) = span (< x) xs in (quicksort a) ++ [x] ++ (quicksort b)As for myself I often find that I have to fully explore the problem on my own terms before I can maturely optimize my source.