Ignore:
Timestamp:
Oct 30, 2008, 8:28:51 PM (12 years ago)
Author:
yura
Message:
File:
1 edited

Legend:

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

    r4011 r4012  
    227227  };
    228228
     229$public $func SumNumbers e.list = e.list;
     230SumNumbers e.list =
     231  <Table> :: s.table,
     232  {
     233    e.list : e (e.expr s.n) e,
     234      { <Lookup s.table e.expr>; 0; } : s.num,
     235      <Bind s.table (e.expr) (<Add s.num s.n>)>,
     236      $fail;
     237    <MapIn &Concat <Entries s.table>>;
     238  };
     239
    229240//Replicate s.n e.expr =
    230241//  s.n /*e.list*/ $iter
Note: See TracChangeset for help on using the changeset viewer.