Proposal #3999: Improved folds for Data.Map and Data.IntMap

Louis Wasserman wasserman.louis at gmail.com
Thu Apr 22 15:17:37 EDT 2010


Heh.

Just to ask, though -- would anything major get broken if we *did* go ahead,
modify base, and delay inlining foldl?

Louis Wasserman
wasserman.louis at gmail.com
http://profiles.google.com/wasserman.louis


On Thu, Apr 22, 2010 at 1:36 PM, Gwern Branwen <gwern0 at gmail.com> wrote:

> On Thu, Apr 22, 2010 at 12:15 PM, Roman Leshchinskiy <rl at cse.unsw.edu.au>
> wrote:
> > On 23/04/2010, at 00:32, Gwern Branwen wrote:
> >
> >> On Thu, Apr 22, 2010 at 4:08 AM, Roman Leshchinskiy <rl at cse.unsw.edu.au>
> wrote:
> >>>
> >>> FWIW, I'm a bit surprised that you need foldl on lists anyway. I
> thought everybody uses foldl'.
> >>
> >> Not nearly:
> http://www.reddit.com/r/haskell/comments/bmd5u/thunks_and_haskell/c0nl7u2
> >>
> >> There are a lot of foldl uses out there.
> >
> > Hmm, I'd love to see some real-world uses of foldl. I have no idea what
> to optimise it for in vector. Unfortunately, the link above doesn't give any
> examples.
> >
> > Roman
>
> Well, since you ask...
>
> $ find . -name "*.hs" -exec grep -H ' foldl ' {} \;  > ~/fold.txt
> $ wc ~/fold.txt
>  2206  24333 225619 fold.txt
>
> --
> gwern
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20100422/1b6d4d80/attachment.html


More information about the Libraries mailing list