Help for this page

Select Code to Download


  1. 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]
    
  2. or download this
          ($minimum) = sort {$a <=> $b} @items;
    
  3. or download this
        minimum = head(qsort array);
    
  4. or download this
        sub zero {
          return 0;
        }
    
        $x = zero(SOME_VERY_LONG_COMPLICATED_EXPRESSION);