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@gmail.com http://profiles.google.com/wasserman.louis On Thu, Apr 22, 2010 at 1:36 PM, Gwern Branwen <gwern0@gmail.com> wrote:
On Thu, Apr 22, 2010 at 12:15 PM, Roman Leshchinskiy <rl@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@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