`qsort'
-------

qsort(ARRAY[,FUNC])
     :: Sorts an array ARRAY.

RETURN
     ARRAY (The same as the input; Only the elements are exchanged.)

ARRAY
     array

FUNC
     function for comparison

   * This function sorts an array by QUICK SORT.

   * If FUNC is not specified, the built-in comparison function is used
     and the array is sorted in increasing order.

   * If a function of two arguments FUNC which returns 0, 1, or -1 is
     provided, then an ordering is detemined so that `A<B' if
     `FUNC(A,B)=1' holds, and the array is sorted in increasing order
     with respect to the ordering.

   * The returned array is the same as the input. Only the elements are
     exchanged.

     [0] qsort(newvect(10,[1,4,6,7,3,2,9,6,0,-1]));
     [ -1 0 1 2 3 4 6 6 7 9 ]
     [1] def rev(A,B) { return A>B?-1:(A<B?1:0); }
     [2] qsort(newvect(10,[1,4,6,7,3,2,9,6,0,-1]),rev);
     [ 9 7 6 6 4 3 2 1 0 -1 ]

References
     *Note `ord': ord, *Note `vars': vars.

