- or download this
qsort [] = []
qsort (x:xs) = qsort elts_lt_x ++ [x] ++ qsort elts_gr_x
where
elts_lt_x = [y | y <- xs, y < x]
elts_gr_x = [y | y <- xs, y > x]
- or download this
($minimum) = sort {$a <=> $b} @items;
- or download this
minimum = head(qsort array);
- or download this
sub zero {
return 0;
}
$x = zero(SOME_VERY_LONG_COMPLICATED_EXPRESSION);