Answer to Question 29-6

  void sort(List& L)
  {
    List R = emptyList;
    for(List p = L; !isEmpty(p); p = tail(p))
    {
      insert(head(p), R);
    }
    destroy(L);
    L = R;
  }