Changeset 4029


Ignore:
Timestamp:
Nov 10, 2008, 5:15:41 PM (12 years ago)
Author:
yura
Message:
 
Location:
to-imperative/trunk/java/refal/refal/plus
Files:
2 edited

Legend:

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

    r4023 r4029  
    9595$public $func Filter t.func e.list = e.list;
    9696Filter t.func e.list = <Map (&FilterHelp t.func) e.list>;
     97
     98$func? FilterInHelp t.func t.term = e.term_or_empty;
     99FilterInHelp t.func t.term = t.term : (e.expr), { <Apply t.func e.expr> :: e = t.term; ; };
     100
     101$public $func FilterIn t.func e.list = e.list;
     102FilterIn t.func e.list = <Map (&FilterInHelp t.func) e.list>;
    97103
    98104$func FilterWithContextHelp t.func (e.left) t.term (e.right) = e.term_or_empty;
     
    222228};
    223229
     230$public $func Subtract (e.list1) (e.list2) = e.list;
     231Subtract (e.list1) (e.list2) =
     232  /*empty*/ (e.list1) $iter {
     233    e.list1 : term e.rest,
     234      {
     235        e.list2 : e term e =  e.not (e.rest);
     236        = e.not term (e.rest);
     237      };
     238  } ::  e.not (e.list1), e.list1 : /*empty*/ =
     239  e.not;
     240
    224241//$const Concat = (&Map &Deparen_Term);
    225242//
  • to-imperative/trunk/java/refal/refal/plus/Rational.rf

    r3999 r4029  
    5151  } :: eOut, <ToChars eOut>;
    5252
    53 QFromString \{
     53QFromString e.string, <ToChars e.string> : \{
    5454  eIn1 '.' eIn2 =
    5555  {eIn1 : /*empty*/, '0'; eIn1;} :: eIn1,
Note: See TracChangeset for help on using the changeset viewer.