Ignore:
Timestamp:
Oct 22, 2008, 8:40:24 PM (12 years ago)
Author:
orlov
Message:
File:
1 edited

Legend:

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

    r3988 r3989  
    1515
    1616Append (e1) e2 = e2 e1;
     17
     18EqTerms t1 t1;
     19
     20CompareTerms t1 t2 = <Compare (t1) (t2)>;
    1721
    1822Zip (e.list1) (e.list2) =
     
    134138  e.ll;
    135139
    136 Nub e.expr =
     140Nub e.expr = <NubBy &EqTerms e.expr>;
     141
     142NubBy s.eq e.expr =
    137143  e.expr () $iter {
    138144    e.expr : term e.rest, {
    139       e.selected : e term e = e.rest (e.selected);
    140       e.rest (e.selected term);
     145      <Any s.eq (term) (e.selected)> = e.rest (e.selected);
     146      e.rest (e.selected (term));
    141147    };
    142148  } :: e.expr (e.selected),
    143149  e.expr : /*empty*/ =
    144   e.selected;
     150  <Concat e.selected>;
    145151
    146152Replicate s.n e.expr =
     
    193199  };
    194200
    195 Sort e.list = <SortBy &Compare e.list>;
     201Sort e.list = <SortBy &CompareTerms e.list>;
    196202
    197203/*
Note: See TracChangeset for help on using the changeset viewer.