Changeset 4023


Ignore:
Timestamp:
Nov 1, 2008, 2:48:03 PM (12 years ago)
Author:
yura
Message:
  • Updated version: number first.
File:
1 edited

Legend:

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

    r4022 r4023  
    280280  e.new_list;
    281281
     282$func FrequenciesHelp (e.expr) (s.num) = s.num e.expr;
     283FrequenciesHelp (e.expr) (s.num) = s.num e.expr;
     284 
    282285$public $func Frequencies e.list = e.list;
    283286Frequencies e.list =
     
    288291      <Bind s.table (t.term) (<Add s.num 1>)>,
    289292      $fail;
    290     <MapIn &Concat <Entries s.table>>;
     293    <Sort <MapIn &FrequenciesHelp <Entries s.table>>>;
    291294  };
    292295
     
    295298  <Table> :: s.table,
    296299  {
    297     e.list : e (e.expr s.n) e,
     300    e.list : e (s.n e.expr) e,
    298301      { <Lookup s.table e.expr>; 0; } : s.num,
    299302      <Bind s.table (e.expr) (<Add s.num s.n>)>,
    300303      $fail;
    301     <MapIn &Concat <Entries s.table>>;
     304    <Sort <MapIn &FrequenciesHelp <Entries s.table>>>;
    302305  };
    303306
Note: See TracChangeset for help on using the changeset viewer.