Strictness making it worst?

2001-11-29 Thread Jorge Adriano
Hi, I've just started messing around with strictness. My goal now is understanding when and how to use it. I began with simple examples like making a strict foldl. When trying to sum a list of 6 elements with lazy foldl I'd get a stack space overflow, with a strict foldl I was able to sum

Re: Strictness making it worst?

2001-11-29 Thread Jorge Adriano
Then I tried: sfibac :: IntPos - (IntPos,IntPos) - (IntPos,IntPos) sfibac n (a,b) | n == 0= (a,b) | otherwise = sfibac (n-1) (b, (+b) $! a) I'm sorry I meant: sfibac :: IntPos - (IntPos,IntPos) -