Ignore:
Timestamp:
Oct 22, 2008, 11:34:00 PM (12 years ago)
Author:
yura
Message:
File:
1 edited

Legend:

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

    r3989 r3990  
    140140Nub e.expr = <NubBy &EqTerms e.expr>;
    141141
    142 NubBy s.eq e.expr =
     142NubBy s.eqTerms e.expr =
    143143  e.expr () $iter {
    144144    e.expr : term e.rest, {
    145       <Any s.eq (term) (e.selected)> = e.rest (e.selected);
     145      <Any s.eqTerms term (e.selected)> = e.rest (e.selected);
    146146      e.rest (e.selected (term));
    147147    };
     
    178178};
    179179
    180 SortBy s.compare e.list =
     180SortBy s.cmpTerms e.list =
    181181  <Length e.list> :: s.len,
    182182  {
    183183    <Le (s.len) (1)> = e.list;
    184184    <Div s.len 2> :: s.k =
    185       <Merge s.compare (<SortBy s.compare <Left 0 s.k e.list>>) (<SortBy s.compare <Middle s.k 0 e.list>>)>;
     185      <Merge s.cmpTerms (<SortBy s.cmpTerms <Left 0 s.k e.list>>) (<SortBy s.cmpTerms <Middle s.k 0 e.list>>)>;
    186186  };
    187187
    188 $func Merge s.compare (e.left) (e.right) = e.merged_list;
    189 Merge s.compare (e.left) (e.right) =
     188$func Merge s.cmpTerms (e.left) (e.right) = e.merged_list;
     189Merge s.cmpTerms (e.left) (e.right) =
    190190  (e.left) (e.right) $iter {
    191191    e.left : t.l e.left_rest, e.right : t.r e.right_rest = {
    192       <Apply s.compare (t.l) (t.r)> : '<' = (e.left_rest) (e.right) e.merged t.l;
    193       (e.left) (e.right_rest) e.merged t.r;
     192      <Apply s.cmpTerms t.l t.r> : '<' = (e.left_rest) (e.right) e.merged t.l;
     193      = (e.left) (e.right_rest) e.merged t.r;
    194194    };
    195195  } :: (e.left) (e.right) e.merged,
Note: See TracChangeset for help on using the changeset viewer.