Ignore:
Timestamp:
Oct 28, 2008, 3:56:29 PM (12 years ago)
Author:
yura
Message:
File:
1 edited

Legend:

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

    r4001 r4004  
    33$module "refal.plus.List2";
    44
    5 $use Apply Access Arithm Compare Table;
     5$use Apply Access Arithm Box Compare Table;
    66
    77$func SimplifyFunction t.func e.arg = s.func e.arg;
     
    2020    e.arg : /* empty */ = s.func;
    2121    = (s.func e.arg);
     22  };
     23
     24$public $func Ints s.start s.end = e.list;
     25Ints s.start s.end =
     26  {
     27    <Le (s.start) (s.end)> =
     28      s.start $iter e.list s.start <Add s.start 1> :: e.list s.start,
     29      s.start : s.end =
     30      e.list;
     31    = s.start $iter e.list s.start <Sub s.start 1> :: e.list s.start,
     32      s.start : s.end =
     33      e.list;
     34  };
     35
     36$public $func MapWithContext t.func e.list = e.list;
     37MapWithContext t.func e.list =
     38  <Box> :: s.box,
     39  {
     40    e.list : e.left t.term e.right,
     41      <Put s.box <Apply t.func (e.left) t.term (e.right)>>,
     42      $fail;
     43    <Get s.box>;
    2244  };
    2345
Note: See TracChangeset for help on using the changeset viewer.