src/Pure/seq.ML
changeset 4279 835ea07170a6
parent 4270 957c887b89b5
child 4992 c63a93b8577c
equal deleted inserted replaced
4278:c64867c093fb 4279:835ea07170a6
    42 (*return next sequence element as None or Some (x, xq)*)
    42 (*return next sequence element as None or Some (x, xq)*)
    43 fun pull (Seq f) = f ();
    43 fun pull (Seq f) = f ();
    44 
    44 
    45 
    45 
    46 (*the empty sequence*)
    46 (*the empty sequence*)
    47 val empty = make (fn () => None);
    47 val empty = Seq (fn () => None);
    48 
    48 
    49 (*prefix an element to the sequence -- use cons (x, xq) only if
    49 (*prefix an element to the sequence -- use cons (x, xq) only if
    50   evaluation of xq need not be delayed, otherwise use
    50   evaluation of xq need not be delayed, otherwise use
    51   make (fn () => Some (x, xq))*)
    51   make (fn () => Some (x, xq))*)
    52 fun cons x_xq = make (fn () => Some x_xq);
    52 fun cons x_xq = make (fn () => Some x_xq);