Changeset 4030


Ignore:
Timestamp:
Nov 11, 2008, 7:37:57 PM (12 years ago)
Author:
yura
Message:
File:
1 edited

Legend:

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

    r4029 r4030  
    168168  };
    169169
    170 $public $func Products e.lists = e.lists;
    171 Products {
    172   /* empty */ = /* empty */;
    173   (e.list) = <Map &Paren e.list>;
    174   (e.list) e.lists = <Product (e.list) (<Products e.lists>)>;
     170$public $func DirectProduct e.lists = e.lists;
     171DirectProduct e.lists = <DirectProductWith &Paren e.lists>;
     172
     173$func? DirectProductWithHelp t.func e.lists t.term = e.lists;
     174DirectProductWithHelp t.func e.lists t.term = <DirectProductWith (t.func t.term) e.lists>;
     175
     176$public $func? DirectProductWith t.func e.lists = e.lists;
     177DirectProductWith t.func e.lists = e.lists : {
     178  /* empty */ = <Apply t.func>;
     179  (e.list) e.tail = <Map (&DirectProductWithHelp t.func e.tail) e.list>;
    175180};
    176 
    177 $func? DirectProductWithHelp s.box t.func (e.args) e.lists = ;
    178 DirectProductWithHelp s.box t.func (e.args) e.lists = e.lists : {
    179   /* empty */ = <Put s.box <Apply t.func e.args>>;
    180   (e.head) e.tail =
    181     {
    182       e.head : e t.term e,
    183         <DirectProductWithHelp s.box t.func (e.args t.term) e.tail>,
    184         $fail;;
    185     };
    186 };
    187 
    188 $public $func? DirectProductWith t.func e.lists = e.list;
    189 DirectProductWith t.func e.lists = {
    190   e.lists : /* empty */ = /* empty */;
    191   = <Box> :: s.box, <DirectProductWithHelp s.box t.func () e.lists>, <Get s.box>;
    192 };
    193181
    194182$public $func? IsElem e.list t.item = ;
Note: See TracChangeset for help on using the changeset viewer.