I don't think that list comprehensions are very idiomatic in Haskell, one would probably use Data.List.partition instead:
qsort [] = [] qsort (p:xs) = low ++ [p] ++ high where (low, high) = partition (< p) xs
Hey, who said that static typing caught all bugs ? :)
forall $ \xs -> sorted (qsort xs :: [Int])
I don't think that list comprehensions are very idiomatic in Haskell, one would probably use Data.List.partition instead: