Ignore:
Timestamp:
Oct 9, 2008, 9:57:49 PM (12 years ago)
Author:
yura
Message:
  • Library extentions (after hdd errors).
File:
1 edited

Legend:

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

    r3953 r3964  
    143143//** $func Get-While stream s.pred = expr;
    144144
    145 Get_While stream s.pred, {
     145Get_While stream s.pred e.predArgs, {
    146146  <Get stream> : (e.buf) (s.func e.args) =
    147147    (/*e.str*/) (e.buf) $iter {
    148       e.buf : t1 e2, {
    149         <Apply s.pred t1> : e = (e.str t1) (e2);
    150         (e.str) (e.buf) Stop;
    151       };
    152       (e.str) (<Apply s.func e.args>);
    153       (e.str) (e.buf) Stop;
     148      e.buf : e.head t1 e.tail, # \{ <Apply s.pred e.predArgs t1> : e; } = (e.str e.head) (t1 e.tail) Stop;
     149      (e.str e.buf) (<Apply s.func e.args>);
     150      (e.str e.buf) () Stop;
    154151    } :: (e.str) (e.buf) e.Isstop,
    155152    e.Isstop : Stop =
     
    159156};
    160157
     158Get_Until stream s.pred e.predArgs, {
     159  <Get stream> : (e.buf) (s.func e.args) =
     160    (/*e.str*/) (e.buf) $iter {
     161      e.buf : e.head t1 e.tail, <Apply s.pred e.predArgs t1> : e = (e.str e.head) (t1 e.tail) Stop;
     162      (e.str e.buf) (<Apply s.func e.args>);
     163      (e.str e.buf) () Stop;
     164    } :: (e.str) (e.buf) e.Isstop,
     165    e.Isstop : Stop =
     166    <Store stream (e.buf) (s.func e.args)>,
     167    e.str;
     168  <Lib_Error (Stream "Get_Until") "Arg 1 is not a Stream"> = $fail;
     169};
    161170
    162171//** $func? End-of-Stream? stream = ;
Note: See TracChangeset for help on using the changeset viewer.