src/Pure/General/scan.ML
changeset 33957 e9afca2118d4
parent 33955 fff6f11b1f09
child 37216 3165bc303f66
equal deleted inserted replaced
33956:6f549f5e7066 33957:e9afca2118d4
   219 
   219 
   220 (* trace input *)
   220 (* trace input *)
   221 
   221 
   222 fun trace scan xs =
   222 fun trace scan xs =
   223   let val (y, xs') = scan xs
   223   let val (y, xs') = scan xs
   224   in ((y, (uncurry take) (length xs - length xs', xs)), xs') end;
   224   in ((y, take (length xs - length xs') xs), xs') end;
   225 
   225 
   226 
   226 
   227 (* stopper *)
   227 (* stopper *)
   228 
   228 
   229 datatype 'a stopper = Stopper of ('a list -> 'a) * ('a -> bool);
   229 datatype 'a stopper = Stopper of ('a list -> 'a) * ('a -> bool);