/* ----------------------------------------------------------------------------- * * Kernel : Scan * Copyright : [2008..2011] Manuel M T Chakravarty, Gabriele Keller, Sean Lee, Trevor L. McDonell * License : BSD3 * * Maintainer : Trevor L. McDonell * Stability : experimental * * Data.List-style exclusive scans with an associative binary function, and a * variant where the final reduction result is returned separately: * * > scanl' f z xs = * > let r = Data.List.scanl f z xs * > in (init r, last r) * * This variant is generated by defining HASKELL_STYLE as zero. * * ---------------------------------------------------------------------------*/ #include #include