seq / strictness and laziness

Amanda Clare
Mon, 12 Nov 2001 16:36:29 +0000

Dean Herington wrote:
> `seq` forces evaluation of only the top-level construct in its first
> argument.  (($!) similarly for its second argument.)  I would guess your
> "newcounts" are structured (probably a tuple or list), in which case you are
> not forcing evaluation deeply enough.  See
> and followup
> article.

Thanks, that's just what I need. It works! Perhaps if this is becoming a
frequently asked question, there should be a mention of this problem in
the Haskell report where seq is described. 

Amanda Clare
Tel: +44 (0)1970 621922  Fax: +44 (0)1970 622455
Dept. of Computer Science, University of Wales, Aberystwyth, SY23 3DB