Re: heap exhausted

1998-10-05 Thread Simon Marlow
[ this reply was slightly delayed because I accidentally sent it to just Fergus instead of the whole list... ] Fergus Henderson <[EMAIL PROTECTED]> writes: > The query quoted below, about heap usage in a 5-line Haskell program, > has remained unanswered for two weeks. Ok, I'll give it a shot

Re: heap exhausted

1998-09-28 Thread Fergus Henderson
The query quoted below, about heap usage in a 5-line Haskell program, has remained unanswered for two weeks. Can we conclude that reasoning about heap usage in lazy functional languages is simply too difficult for mere mortals? If even simple examples like this one are too hard for the experts t

Re: heap exhausted

1998-09-28 Thread Malcolm Wallace
Fergus Henderson notes: > The query quoted below, about heap usage in a 5-line Haskell program, > has remained unanswered for two weeks. Ok, here's an answer. Firstly, foldl' is not in the Standard Prelude, so I'm assuming the definition is as follows (from hugs 1.3): foldl' :: Ev

RE: heap exhausted

1998-09-28 Thread Sigbjorn Finne
Fergus Henderson [mailto:[EMAIL PROTECTED]] writes: > > The query quoted below, about heap usage in a 5-line Haskell program, > has remained unanswered for two weeks. > > Can we conclude that reasoning about heap usage in lazy > functional languages is simply too difficult for mere mortals? >

heap exhausted

1998-09-14 Thread Martin Stein
Hi, though I think there was written enough about this theme, I can't still understand the following problem (foldl' from the Prelude.hs): > seq1 x = (3-x):seq1 x > seq2 x = (3-x):seq2 1 > > countOne xs = foldl' (\c x -> if x==1 then c+1 else c) 0 xs > > num1 n = countOne (take n (seq1 1)) > num