using less stack

Amanda Clare
Mon, 18 Mar 2002 17:43:49 +0000

I have stack problems: my program uses too much stack. I suspect, from 
removing bits of code, that it's due to a foldr in my program. If I use 
foldr or foldl on a long list (eg >500 bulky elements for a 3M stack), 
is this likely to be filling the stack? What is it that gets stored on 
the stack? If so, is there an obvious refactoring of the fold to use?


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