home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / ifp / part01 / fproot / demo / SlowSort < prev    next >
Encoding:
Text File  |  1987-07-05  |  231 b   |  13 lines

  1. (*
  2.  * SlowSort
  3.  *
  4.  * Sort a sequence the hard way, i.e. take all permutations
  5.  * and pick one for which all elements are in order.
  6.  *)
  7. DEF SlowSort AS
  8.    Permute | 
  9.    FILTER 
  10.       [tl,tlr]|trans | EACH >= END | all 
  11.    END | 1;
  12.  
  13.