Ignore:
Timestamp:
Oct 9, 2008, 9:57:49 PM (12 years ago)
Author:
yura
Message:
  • Library extentions (after hdd errors).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/java/refal/refal/plus/List.rf

    r3752 r3964  
    143143  e.list;
    144144
     145
     146
     147$func QSort_Split t.num e.list = (e.list) (e.list);
     148
     149QSort_Split t.num e.list,
     150  () () (e.list) $iter {
     151    e.list : t.head e.tail, {
     152      <Le (t.head) (t.num)>,
     153        (e.smaller t.head) (e.greater) (e.tail);
     154      (e.smaller) (e.greater t.head) (e.tail);
     155    };
     156  } :: (e.smaller) (e.greater) (e.list),
     157  e.list : /*empty*/,
     158  (e.smaller) (e.greater);
     159
     160QSort {
     161  /* empty */   = /* empty */;
     162  t.head e.tail = <QSort_Split t.head e.tail> :: (e.smaller) (e.greater),
     163    <QSort e.smaller> t.head <QSort e.greater>;
     164};
     165
    145166/*
    146167 * Returns number of e.expr entries in e.source and e.source without all e.expr's.
Note: See TracChangeset for help on using the changeset viewer.