Make scanl fuse; add scanl'
authorDavid Feuer <David.Feuer@gmail.com>
Tue, 7 Oct 2014 18:51:25 +0000 (20:51 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Tue, 7 Oct 2014 18:52:36 +0000 (20:52 +0200)
commitd45693a5384460d22a6437b9cda463b4ec4b6a37
treec1844216cf357b51803f05dcb02287f53623c56c
parent205b103215edfb7597fe009e8a74c11699f048fa
Make scanl fuse; add scanl'

Summary:
Make scanl a good producer and a good consumer for fold/build
fusion. Add strictly-accumulating scanl', which is required for
Data.List.inits.

Reviewers: nomeata, austin

Reviewed By: austin

Subscribers: spacekitteh, thomie, carter, ezyang, simonmar

Differential Revision: https://phabricator.haskell.org/D314

GHC Trac Issues: #9356
libraries/base/GHC/List.lhs