qsort [] = [] qsort (x:xs) = qsort lower ++ [x] ++ qsort higher where lower = filter (< x) xs higher = filter (>= x) xs