Changeset 4074


Ignore:
Timestamp:
Feb 12, 2009, 1:41:08 AM (11 years ago)
Author:
orlov
Message:
  • Include Ints function in the List library.
Location:
to-imperative/trunk/java/refal/refal/plus
Files:
2 edited

Legend:

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

    r3990 r4074  
    11// $Id$
    22
    3 $use Apply Access Arithm Compare;
     3$use Apply Access Arithm Compare List2;
    44
    55$func Deparen_Term term = expr;
     
    1515
    1616Append (e1) e2 = e2 e1;
     17
     18Ints s.start s.end = <List2.Ints s.start s.end>;
    1719
    1820EqTerms t1 t1;
     
    4042  () e.list $iter {
    4143    e.list : t.item e.rest =
    42       (e.new_list <Apply s.Fname e.Fargs t.item>) e.rest;
     44      (e.new_list <Apply.Apply s.Fname e.Fargs t.item>) e.rest;
    4345  } :: (e.new_list) e.list,
    4446  e.list : /*empty*/ =
     
    4850  () e.list $iter {
    4951    e.list : (e.item) e.rest =
    50       (e.new_list (<Apply s.Fname e.Fargs e.item>)) e.rest;
     52      (e.new_list (<Apply.Apply s.Fname e.Fargs e.item>)) e.rest;
    5153  } :: (e.new_list) e.list,
    5254  e.list : /*empty*/ =
     
    5658  () e.list $iter {
    5759    e.list : t.item e.rest, {
    58       <Apply s.Fname e.Fargs t.item> : e =
     60      <Apply.Apply s.Fname e.Fargs t.item> : e =
    5961        (e.new_list t.item) e.rest;
    6062      (e.new_list) e.rest;
     
    6769  () () e.list $iter {
    6870    e.list : t.item e.rest, {
    69       <Apply s.Fname e.Fargs t.item> : e =
     71      <Apply.Apply s.Fname e.Fargs t.item> : e =
    7072        (e.true_list t.item) (e.false_list) e.rest;
    7173      (e.true_list) (e.false_list t.item) e.rest;
     
    8183  (e.value) e.list $iter {
    8284    e.list : e.something t.last =
    83       (<Apply s.Fname e.Fargs t.last e.value>) e.something;
     85      (<Apply.Apply s.Fname e.Fargs t.last e.value>) e.something;
    8486  } :: (e.value) e.list,
    8587  e.list : /*empty*/ =
     
    9597  e.list $iter {
    9698    e.list : t.item e.rest =
    97       <Apply s.Fname e.Fargs t.item> : e,
     99      <Apply.Apply s.Fname e.Fargs t.item> : e,
    98100      e.rest;
    99101  } :: e.list,
     
    103105  e.list $iter {
    104106    e.list : t.item e.rest =
    105       # \{ <Apply s.Fname e.Fargs t.item> : e; },
     107      # \{ <Apply.Apply s.Fname e.Fargs t.item> : e; },
    106108      e.rest;
    107109  } :: e.list,
     
    190192  (e.left) (e.right) $iter {
    191193    e.left : t.l e.left_rest, e.right : t.r e.right_rest = {
    192       <Apply s.cmpTerms t.l t.r> : '<' = (e.left_rest) (e.right) e.merged t.l;
     194      <Apply.Apply s.cmpTerms t.l t.r> : '<' = (e.left_rest) (e.right) e.merged t.l;
    193195      = (e.left) (e.right_rest) e.merged t.r;
    194196    };
  • to-imperative/trunk/java/refal/refal/plus/List.rfi

    r3991 r4074  
    55$func Id e.expr = e.expr;
    66
     7$func Append (e.expr1) e.expr2 = e.expr2expr1;
     8
     9$func Ints s.start s.end = e.list;
     10
    711$func? EqTerms t1 t2 = ;
    812
    913$func CompareTerms t1 t2 = s.Lt_or_Eq_or_Gt;
    10 
    11 $func Append (e.expr1) e.expr2 = e.expr2expr1;
    1214
    1315$func Zip (e.list1) (e.list2) = e.list;
Note: See TracChangeset for help on using the changeset viewer.