the permutation of a sort



Hello,
  Is there an easy function to find the permutation used in
sorting a list?

For instance, take the list

   xx: [2,3,1,5]

Sorting it in increasing order gives

   yy: [1,2,3,5]

So, the permutation s() which produced the sort is

  s(1) = 2, s(2)=3, s(3) = 1, s(4) = 4

Thanks for any information.

-sen

-- 
  ---------------------------------------------------------------------------
  | Sheldon E. Newhouse            |    e-mail: sen1 at math.msu.edu           |
  | Mathematics Department         |       				   |
  | Michigan State University      | telephone: 517-355-9684                |
  | E. Lansing, MI 48824-1027 USA  |       FAX: 517-432-1562                |
  ---------------------------------------------------------------------------