Changeset 3995 for toimperative/trunk/java/refal/refal/plus/List2.rf
 Timestamp:
 Oct 24, 2008, 2:21:05 PM (12 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

toimperative/trunk/java/refal/refal/plus/List2.rf
r3994 r3995 117 117 e.ll; 118 118 119 $func Paren_Term term = (term); 120 Paren_Term term = (term); 121 122 $func ConcatHelp t.term = e.expr; 123 ConcatHelp { 124 (e.expr) = e.expr; 125 t.term = t.term; 126 }; 127 128 $public $func Concat e.lists = e.list; 129 Concat e.lists = <Map &ConcatHelp e.lists>; 130 119 131 //Nub e.expr = <NubBy &EqTerms e.expr>; 120 132 // … … 138 150 // 139 151 // 140 //$func QSort_Split t.num e.list = (e.list) (e.list); 141 // 142 //QSort_Split t.num e.list, 143 // () () (e.list) $iter { 144 // e.list : t.head e.tail, { 145 // <Le (t.head) (t.num)>, 146 // (e.smaller t.head) (e.greater) (e.tail); 147 // (e.smaller) (e.greater t.head) (e.tail); 148 // }; 149 // } :: (e.smaller) (e.greater) (e.list), 150 // e.list : /*empty*/, 151 // (e.smaller) (e.greater); 152 // 153 //QSort { 154 // /* empty */ = /* empty */; 155 // t.head e.tail = <QSort_Split t.head e.tail> :: (e.smaller) (e.greater), 156 // <QSort e.smaller> t.head <QSort e.greater>; 157 //}; 158 // 152 153 $func QSort_Split t.num e.list = (e.list) (e.list); 154 QSort_Split t.num e.list, 155 () () (e.list) $iter { 156 e.list : t.head e.tail, { 157 <Le (t.head) (t.num)>, 158 (e.smaller t.head) (e.greater) (e.tail); 159 (e.smaller) (e.greater t.head) (e.tail); 160 }; 161 } :: (e.smaller) (e.greater) (e.list), 162 e.list : /*empty*/, 163 (e.smaller) (e.greater); 164 165 $public $func QSort e.list = e.list; 166 QSort { 167 /* empty */ = /* empty */; 168 t.head e.tail = <QSort_Split t.head e.tail> :: (e.smaller) (e.greater), 169 <QSort e.smaller> t.head <QSort e.greater>; 170 }; 171 159 172 //SortBy s.cmpTerms e.list = 160 173 // <Length e.list> :: s.len,
Note: See TracChangeset
for help on using the changeset viewer.