RE: heap and walking through a very long list

2001-11-26 Thread Simon Peyton-Jones
. Simon | -Original Message- | From: Joe English [mailto:[EMAIL PROTECTED]] | Sent: 25 November 2001 00:12 | To: [EMAIL PROTECTED] | Subject: Re: heap and walking through a very long list | | | | Simon Peyton-Jones wrote: | | There should really be a strict accumArray, just

Re: heap and walking through a very long list

2001-11-24 Thread Joe English
Simon Peyton-Jones wrote: There should really be a strict accumArray, just as there should be a strict foldl. Yes, please! Is there a way to write a strict version of accumArray in Haskell 98, or does this need to be done by the implementation? --Joe English [EMAIL PROTECTED]

RE: heap and walking through a very long list

2001-11-22 Thread Simon Peyton-Jones
The trouble here is the usual one: accumArray is lazy, and simply accumulates a giant closure in each array slot. Then, when it is evaluated, the stack gets big. There should really be a strict accumArray, just as there should be a strict foldl. There isn't in Haskell 98, but if you are using a