
22 Apr
2010
22 Apr
'10
9:11 p.m.
On 23/04/2010, at 04:36, Gwern Branwen wrote:
On Thu, Apr 22, 2010 at 12:15 PM, Roman Leshchinskiy
wrote: 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
That doesn't really help me, though, because I can't tell why using foldl as opposed to foldl' is essential (or even correct) in these cases. In fact, at a cursory glance a lot of them look quite leaky to me. Roman